Tinderbox v10 Icon

neighbors2Within(scope, distanceNum[, linkTypeStr])


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Data Type Returned: 

Operator First Added: 

Operator in Current Baseline: 

Operator Last Altered: 

Operator Uses Scoped Arguments: 

Operator Has Optional Arguments: 

 Function  [other Function type actions]

 Group  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]

 List [about List data type]

 v9.0.0

 Baseline

 As at baseline

 [More on scoped arguments in Action Code]

 [More on optional operator arguments]


neighbors2Within(scope, distanceNum)

Returns a list of the path(s) of all those notes that can be reached by following between 1 and distanceNum links from the designated note or notes, regardless of the direction of those links (i.e. whether inbound or outbound). Only the shortest possible path between two notes is considered. The operator will report links from the source node to itself, i.e. self-links. Prototype-type links are ignored.

The starting note or notes are considered to be connected to themselves.

For example:

$MyList = neighbors2Within(this, 3); 

Returns the set of notes that are connected from this note by between 1–3 (outbound) links.

neighbors2Within(scope, distanceNum, linkType)

Returns the set of notes that are connected by following between 1 and distanceNum links from the designated note or notes, regardless of the direction of those links (i.e. whether inbound or outbound), but within those links considering only links of the specified link type linkTypeStr.

The starting note or notes are considered to be connected to themselves. To filter on unnamed links use the type "*untitled". For example:

$MyList = neighbors2Within(children, 2, "example"); 

Returns the set of notes that are connected from any of this note's children by between 1–2 (outbound) links of the link type "example".

Different variations of 'neighbor' operators

There are essentially two different subtypes within the 4 operators: