new Path(nodes, edges)
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array.<Node> | path's node list. |
edges |
Array.<Edge> | path's edge list. |
Members
edgeCount
Returns the amount of edges in the path.
Edges
Returns the path's edges as list.
firstNode
Returns the path's first node.
lastNode
Returns the last node of the path.
nodeCount
Returns the amount of nodes in th path.
Nodes
Returns the path's nodes as list.
Methods
getEdge(index) → {Edge}
Returns an edge in a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | (integer) |
Returns:
edge in a given index.
- Type
- Edge
getNode(index) → {Node}
Returns a node in a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | (integer) |
Returns:
node in the given index.
- Type
- Node
toString() → {string}
Returns the path string representation.
Returns:
path string representation.
- Type
- string