Description | ||
Node ID number | ||
Type of arc to traverse to reach a neighbor | ||
Direction of arc used to reach neighbor (in, out or any) | ||
Window locale |
Description:
This procedure searches the neighborhood around a reference node,
nodeID, in the subgraph displayed in a given window, winNum,
to obtain the ID's of adjacent nodes that satisfy the specified
arc traversal criteria. The arcType can be any arc type
specified in the domain or any.
The arcDirection can specify arcs incoming to the reference
node (in), arcs
outgoing from the reference node (out),
or either (any).
Arcs that have been filtered out of the subgraph are not traversed.
The winNum parameter corresponds to the number in the
window title. For example, a window title of "General: 1"
has a winNum of one.
The rcl_node_get_neighbors_in_window
procedure is a variant of
rcl_node_get_neighbors.
Return Value:
A list of node ID's is returned in a null-terminated, printable
string with intervening spaces between node ID's. The string
can be used as a list in a Tcl script.
Exceptions:
If any of the parameters is out of range, a popup dialog box displays
the error.
Example:
# Given a set of selected nodes in the General 2 window, # collapse them with their immediate children that are # connected by unfiltered, outgoing "call" arcs into a # single node. set numnodes [rcl_select_num_nodes] set nodeid [rcl_select_first_node] for { set i 0 } { $i < $numnodes } { incr i } { set nlist [rcl_node_get_neighbors_in_window $nodeid \ call out 2] foreach n $nlist { rcl_select_id $n 1 } set nodeid [rcl_select_next_node] } rcl_collapse