Represents a so-called node in the directed graph data type Graph.
Remarks
Most notably, a node provides access to its adjacent edges (represented by instances of class Edge). These can be distinguished into the sets of incoming and outgoing edges.
Iteration over all three sets of edges is provided by means of bidirectional cursors that present a read-only view of the respective set (getEdgeCursor, getInEdgeCursor, getOutEdgeCursor). Also supported is iteration over all nodes at opposite ends of either incoming edges or outgoing edges (getPredecessorCursor, getSuccessorCursor).
The number of overall edges at a node is called its degree (degree), which is the sum of incoming and outgoing edges (inDegree, outDegree).
Important: Class Graph is the single authority for any structural changes to the graph data type. Specifically, this means that there is no way to create or delete a node or an edge without using an actual Graph instance.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.Node
See Also
Constructors
Properties
Gets the overall number of incoming and outgoing edges at this node.
Yields a dynamic IEnumerable<T> for Edges that can be used to iterate over the adjacent edges at this instance.
Remarks
See Also
Gets the first incoming edge at this node, or null
if it does not exist.
See Also
Gets the first outgoing edge at this node, or null
if it does not exist.
See Also
Gets the graph this node belongs to.
Remarks
null
.See Also
Gets the number of incoming edges at this node.
See Also
Gets the index of this node within its graph G.
Remarks
Node indices represent the ordering of standard node iteration on G. The value of an index is >= 0
and < G.nodeCount()
.
Note that indices are subject to change whenever the sequence of nodes in a graph is modified by either removing, hiding, reinserting, or unhiding a node, or by explicitly changing its position in the sequence.
Preconditions
- This node must belong to some graph.
See Also
Yields a dynamic IEnumerable<T> for Edges that can be used to iterate over ingoing edges at this instance.
Remarks
Gets the last incoming edge at this node, or null
if it does not exist.
See Also
Gets the last outgoing edge at this node, or null
if it does not exist.
See Also
Yields a dynamic IEnumerable<T> for YNodes that can be used to iterate over the opposite sides of adjacent adjacent edges at this instance.
Remarks
See Also
Gets the number of outgoing edges at this node.
See Also
Yields a dynamic IEnumerable<T> for Edges that can be used to iterate over outgoing edges at this instance.
Remarks
Yields a dynamic IEnumerable<T> for YNodes that can be used to iterate over the opposite sides of adjacent incoming edges at this instance.
Remarks
Yields a dynamic IEnumerable<T> for YNodes that can be used to iterate over the opposite sides of adjacent outgoing edges at this instance.
Remarks
Methods
Returns an edge that connects this node with the given node, if such an edge exists.
Remarks
Otherwise null
is returned.
Note that the first matching edge is returned, and that outgoing edges are tested prior to incoming edges.
See Also
Returns an edge cursor for all incoming and outgoing edges at this node.
Returns an incoming edge that connects the given node with this node, if such an edge exists.
Returns an outgoing edge that connects this node with the given node, if such an edge exists.
Returns an edge cursor for incoming edges at this node.
Remarks
Preconditions
startEdge
is an incoming edge at this node.
Parameters
A map of options to pass to the method.
- startEdge - Edge
- The first edge being accessed by the returned cursor.
See Also
Returns a node cursor for all neighbor nodes of this node.
Remarks
See Also
Returns an edge cursor for outgoing edges at this node.
Remarks
Preconditions
startEdge
is an outgoing edge at this node.
Parameters
A map of options to pass to the method.
- startEdge - Edge
- The first edge being accessed by the returned cursor.
See Also
Returns a node cursor for all predecessor nodes of this node.
Remarks
See Also
Returns a node cursor for all successor nodes of this node.
Remarks
See Also
Sorts incoming edges at this node according to the given comparator.
See Also
Sorts outgoing edges at this node according to the given comparator.