Constructor
Variables
read onlykey:Int = HashKey.next()
A unique identifier for this object.
A hash table transforms this key into an index of an array element by using a hash function.
parent:GraphNode<T>
The node's parent.
During a BFS/DFS traversal, parent
points to the previously visited node or to
itself if the search originated at that node.
Methods
addArc (target:GraphNode<T>, userData:Dynamic = 1):GraphNode<T>
Adds an arc pointing from this node to the specified target
node.
Parameters:
userData | custom data stored in the arc (optional). For example |
---|
free ():Void
Destroys this object by explicitly nullifying the element and all pointers for GC'ing used resources.
Improves GC efficiency/performance (optional).
getArc (target:GraphNode<T>):GraphArc<T>
Finds the arc that is pointing to the target
node or returns null if such an arc does not exist.
inlineisConnected (target:GraphNode<T>):Bool
Returns true if this node is connected to the target
node.
inlineisMutuallyConnected (target:GraphNode<T>):Bool
Returns true if this node and the target
node are pointing to each other.
iterator ():Itr<T>
Returns a new NodeValIterator object to iterate over the elements stored in all nodes that are connected to this node by an outgoing arc.
See: