OverviewSingleDeprecated

jsx3.util

class Graph

Object
->jsx3.util.Graph

class Graph
extends Object
No description provided.

Since:

3.6

Constructor Summary
void
The instance initializer.
Method Summary
boolean
add(objNode : GNode)
Adds a sub-graph to this graph.
boolean
del(objNode : GNode)
Removes a single node from this graph.
GNode
node(id : String | Number)
Returns a node by its ID.
Array<GNode>
Returns all the nodes of this graph.
Array<GNode>
Returns all the root nodes of this graph.
int
Returns the number of nodes in this graph.
Methods Inherited From Object
toString
Constructor Detail

init

void init()
The instance initializer.
Method Detail

add

boolean add(objNode : GNode)
Adds a sub-graph to this graph. objNode is the root of the directed sub-graph.

Parameters:

objNode

Returns:

whether the node was added.  

del

boolean del(objNode : GNode)
Removes a single node from this graph.

Parameters:

objNode

Returns:

whether the node was removed.  

node

GNode node(id : String | Number)
Returns a node by its ID.

Parameters:

id

Returns:

 

nodes

Array<GNode> nodes()
Returns all the nodes of this graph.

Returns:

 

roots

Array<GNode> roots()
Returns all the root nodes of this graph. A root node has no parent nodes.

Returns:

 

size

int size()
Returns the number of nodes in this graph.

Returns: