A graph node.
| GraphNode | A graph node. |
| Variables | |
| data | The node’s data being referenced. |
| arcs | An array of arcs connecting this node to other nodes. |
| marked | A flag indicating whether the node is marked or not. |
| Functions | |
| GraphNode | Creates a new graph node. |
| addArc | Adds an arc to the current graph node, pointing to a different graph node and with a given weight. |
| removeArc | Removes the arc that points to the given node. |
| getArc | Finds the arc that points to the given node. |
| Properties | |
| numArcs | The number of arcs extending from this node. |
The node’s data being referenced.
public var data: *
An array of arcs connecting this node to other nodes.
public var arcs: Array
A flag indicating whether the node is marked or not.
public var marked: Boolean
Creates a new graph node.
public function GraphNode( obj: * )
Adds an arc to the current graph node, pointing to a different graph node and with a given weight.
public function addArc( target: GraphNode, weight: Number ):void
Removes the arc that points to the given node.
public function removeArc( target: GraphNode ):Boolean
Finds the arc that points to the given node.
public function getArc( target: GraphNode ):GraphArc
The number of arcs extending from this node.
public function get numArcs():int
Performs an iterative depth-first traversal starting at a given node.
public function depthFirst( node: GraphNode, visit: Function ):void