| Property | Defined By | ||
|---|---|---|---|
| arcs : Array
An array of arcs connecting this node to other nodes. | GraphNode | ||
| data : *
The node's data being referenced. | GraphNode | ||
| marked : Boolean
A flag indicating whether the node is marked or not. | GraphNode | ||
| numArcs : int [read-only]
The number of arcs extending from this node. | GraphNode | ||
| Method | Defined By | ||
|---|---|---|---|
GraphNode(obj:*)
Creates a new graph node. | GraphNode | ||
Adds an arc to the current graph node, pointing to a different
graph node and with a given weight. | GraphNode | ||
Finds the arc that points to the given node. | GraphNode | ||
Removes the arc that points to the given node. | GraphNode | ||
| arcs | property |
public var arcs:ArrayAn array of arcs connecting this node to other nodes.
| data | property |
public var data:*The node's data being referenced.
| marked | property |
public var marked:BooleanA flag indicating whether the node is marked or not. Used by the depthFirst and breadthFirst methods only.
See also
| numArcs | property |
numArcs:int [read-only] The number of arcs extending from this node.
public function get numArcs():int| GraphNode | () | Constructor |
public function GraphNode(obj:*)Creates a new graph node.
Parametersobj:* — The data to store inside the node.
|
| addArc | () | method |
public function addArc(target:GraphNode, weight:Number):voidAdds an arc to the current graph node, pointing to a different graph node and with a given weight.
Parameters
target:GraphNode — The destination node the arc should point to.
| |
weight:Number — The arc's weight.
|
| getArc | () | method |
public function getArc(target:GraphNode):GraphArcFinds the arc that points to the given node.
Parameters
target:GraphNode — The destination node.
|
GraphArc — A GraphArc object or null if the arc doesn't exist.
|
| removeArc | () | method |
public function removeArc(target:GraphNode):BooleanRemoves the arc that points to the given node.
Parameters
target:GraphNode |
Boolean — True if removal was successful, otherwise false.
|