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
neighbors2(scope, distanceNum)
Returns a list of the path(s) of all those notes that can be reached by following exactly 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. For example:
$MyList = neighbors2(this, 3);
Returns the set of notes that are connected from this note by exactly three links of either direction.
neighbors2(scope, distanceNum, linkTypeStr)
Returns the set of notes that are connected by exactly distanceNum links from the designated note or notes, regardless of the direction of a link (i.e. whether inbound or outbound) and within those links considering only links of the specified link type linkTypeStr. Unnamed links are specified as the type "*untitled". For example:
$MyList = neighbors2(children, 2, "example");
Returns the set of notes that are connected from any of this note's children by exactly two links of any direction but also of the link type "example".
Different variations of 'neighbor' operators
There are essentially two different subtypes within the 4 operators:
- Direction. If the operator name includes a '2' the direction of connecting links are ignored. Otherwise, only outbound links are assessed.
- Distance. If the operator name includes 'Within' then all notes at distances between 1 and distanceNum are considered. Otherwise, only notes at exactly distanceNum are considered.