Package | com.yworks.yfiles.base |
Class | public class Node |
Inheritance | Node com.yworks.yfiles.base.GraphObject |
See also
Property | Defined By | ||
---|---|---|---|
graph : Graph [read-only]
Returns the graph this node belongs to. | Node |
Method | Defined By | ||
---|---|---|---|
Instantiates a new Node object that will be part of the given graph. | Node | ||
Creates a copy of this node that will be inserted into the given graph. | Node | ||
degree():int
Returns the overall number of incoming and outgoing edges at this node. | Node | ||
Returns an edge cursor for all incoming and outgoing edges at this node. | Node | ||
Returns the first incoming edge at this node, or null if it does not exist. | Node | ||
Returns the first outgoing edge at this node, or null if it does not exist. | Node | ||
getClass():Class [override] | Node | ||
Returns an edge that connects this node with the given node, if such an edge exists. | Node | ||
Returns an incoming edge that connects the given node with this node, if such an edge exists. | Node | ||
Returns an outgoing edge that connects this node with the given node, if such an edge exists. | Node | ||
inDegree():int
Returns the number of incoming edges at this node. | Node | ||
index():int
Returns the index of this node within its graph G. | Node | ||
Returns an edge cursor for all incoming edges at this node. | Node | ||
Returns an edge cursor for incoming edges at this node. | Node | ||
Returns the last incoming edge at this node, or null if it does not exist. | Node | ||
Returns the last outgoing edge at this node, or null if it does not exist. | Node | ||
Returns a node cursor for all neighbor nodes of this node. | Node | ||
outDegree():int
Returns the number of outgoing edges at this node. | Node | ||
Returns an edge cursor for all outgoing edges at this node. | Node | ||
Returns an edge cursor for outgoing edges at this node. | Node | ||
Returns a node cursor for all predecessor nodes of this node. | Node | ||
sortInEdges(c:Comparator):void
Sorts incoming edges at this node according to the given comparator. | Node | ||
sortOutEdges(c:Comparator):void
Sorts outgoing edges at this node according to the given comparator. | Node | ||
Returns a node cursor for all successor nodes of this node. | Node | ||
toString():String
Returns a String representation of this node. | Node |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | Node | ||
[static]
Instantiates a new Node object that will be part of the given graph. | Node |
graph | property |
graph:Graph
[read-only]
Returns the graph this node belongs to.
If the node does not belong to a graph, because it was removed or hidden from it, this method returns null
.
public function get graph():Graph
Node | () | Constructor |
public function Node(g:Graph, init:Boolean = true)
Instantiates a new Node object that will be part of the given graph.
Parametersg:Graph — The graph that the created node will belong to.
| |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
createCopy | () | method |
public function createCopy(g:Graph):Node
Creates a copy of this node that will be inserted into the given graph.
Parameters
g:Graph — The graph that the created node will belong to.
|
Node — The newly created Node object.
|
degree | () | method |
public function degree():int
Returns the overall number of incoming and outgoing edges at this node.
Note that self-loops are counted twice. Returnsint |
See also
edges | () | method |
public function edges():EdgeCursor
Returns an edge cursor for all incoming and outgoing edges at this node.
ReturnsEdgeCursor |
See also
firstInEdge | () | method |
public function firstInEdge():Edge
Returns the first incoming edge at this node, or null
if it does not exist.
Edge |
See also
firstOutEdge | () | method |
public function firstOutEdge():Edge
Returns the first outgoing edge at this node, or null
if it does not exist.
Edge |
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getEdge | () | method |
public function getEdge(opposite:Node):Edge
Returns an edge that connects this node with the given node, if such an edge exists.
Otherwise null
is returned.
Parameters
opposite:Node |
Edge |
See also
getEdgeFrom | () | method |
public function getEdgeFrom(source:Node):Edge
Returns an incoming edge that connects the given node with this node, if such an edge exists.
Otherwise null
is returned.
Parameters
source:Node |
Edge |
See also
getEdgeTo | () | method |
public function getEdgeTo(target:Node):Edge
Returns an outgoing edge that connects this node with the given node, if such an edge exists.
Otherwise null
is returned.
Parameters
target:Node |
Edge |
See also
inDegree | () | method |
public function inDegree():int
Returns the number of incoming edges at this node.
Returnsint |
See also
index | () | method |
public function index():int
Returns the index of this node within its graph G.
Node indices represent the ordering of standard node iteration on G. The value of an index is >= 0
and < G.nodeCount()
.
Precondition This node must belong to some graph.
Returnsint |
See also
inEdges | () | method |
public function inEdges():EdgeCursor
Returns an edge cursor for all incoming edges at this node.
ReturnsEdgeCursor |
See also
inEdgesFrom | () | method |
public function inEdgesFrom(startEdge:Edge):EdgeCursor
Returns an edge cursor for incoming edges at this node. The cursor starts at the given edge, and the cyclic sequence order is the same as returned by inEdges() .
Precondition startEdge
is an incoming edge at this node.
Parameters
startEdge:Edge — The first edge being accessed by the returned cursor.
|
EdgeCursor |
See also
initNode1 | () | method |
protected final function initNode1(g:Graph):void
Initializes this object. See the documentation of the corresponding factory method newNode1()
for details.
Parameters
g:Graph |
See also
lastInEdge | () | method |
public function lastInEdge():Edge
Returns the last incoming edge at this node, or null
if it does not exist.
Edge |
See also
lastOutEdge | () | method |
public function lastOutEdge():Edge
Returns the last outgoing edge at this node, or null
if it does not exist.
Edge |
See also
neighbors | () | method |
public function neighbors():NodeCursor
Returns a node cursor for all neighbor nodes of this node. Neighbor nodes are those at the opposite ends of both incoming and outgoing edges.
ReturnsNodeCursor |
See also
newNode1 | () | method |
protected static function newNode1(g:Graph):Node
Instantiates a new Node object that will be part of the given graph.
Parameters
g:Graph — The graph that the created node will belong to.
|
Node |
outDegree | () | method |
public function outDegree():int
Returns the number of outgoing edges at this node.
Returnsint |
See also
outEdges | () | method |
public function outEdges():EdgeCursor
Returns an edge cursor for all outgoing edges at this node.
ReturnsEdgeCursor |
See also
outEdgesFrom | () | method |
public function outEdgesFrom(startEdge:Edge):EdgeCursor
Returns an edge cursor for outgoing edges at this node. The cursor starts at the given edge, and the cyclic sequence order is the same as returned by outEdges() .
Precondition startEdge
is an outgoing edge at this node.
Parameters
startEdge:Edge — The first edge being accessed by the returned cursor.
|
EdgeCursor |
See also
predecessors | () | method |
public function predecessors():NodeCursor
Returns a node cursor for all predecessor nodes of this node. Predecessor nodes are those at the opposite ends of incoming edges.
ReturnsNodeCursor |
See also
sortInEdges | () | method |
public function sortInEdges(c:Comparator):void
Sorts incoming edges at this node according to the given comparator.
Parameters
c:Comparator |
See also
sortOutEdges | () | method |
public function sortOutEdges(c:Comparator):void
Sorts outgoing edges at this node according to the given comparator.
Parameters
c:Comparator |
See also
successors | () | method |
public function successors():NodeCursor
Returns a node cursor for all successor nodes of this node. Successor nodes are those at the opposite ends of outgoing edges.
ReturnsNodeCursor |
See also
toString | () | method |
public function toString():String
Returns a String representation of this node.
ReturnsString |