RAIN.Path.PathNode Class Reference

PathNode is the base class for all path graph nodes. Path node typically consists of a node index and incoming and outgoing edge lists. More...

Inheritance diagram for RAIN.Path.PathNode:
RAIN.Path.VectorPathNode RAIN.Path.WaypointPathNode

List of all members.

Public Member Functions

 PathNode ()
 Default constructor.
 PathNode (int nodeIndex)
 Constructor defining node index.
void AddEdgeIn (PathEdge edge)
 Add an edge to the incoming edge list.
void AddEdgeOut (PathEdge edge)
 Add an edge to the outgoing edge list.
void RemoveAllEdgesTo (int nodeIndex)
 Remove all outgoing edges to the specified node.
void RemoveAllEdgesFrom (int nodeIndex)
 Remove all incoming edges from the specified node.
PathEdge EdgeOut (int index)
 Returns the outgoing edge associated with the specified index.
PathEdge EdgeIn (int index)
 Returns the incoming edge associated with the specified index.
PathEdge EdgeFrom (int nodeIndex)
 Returns the first edge from the specified node index.
PathEdge EdgeFrom (int nodeIndex, int n)
 Returns the nth edge from the specified node index.
PathEdge EdgeTo (int nodeIndex)
 Returns the first edge to the specified node index.
PathEdge EdgeTo (int nodeIndex, int n)
 Returns the nth edge to the specified node index.
void DebugDump ()
 Dump the node index and edge lists to the Logger.
 PathNode (BinaryReader reader)
virtual void Save (BinaryWriter writer)

Properties

int NodeIndex [get]
 The index of this node.
int InEdgeCount [get]
 The number of incoming edges.
int OutEdgeCount [get]
 The number of outgoing edges.

Detailed Description

PathNode is the base class for all path graph nodes. Path node typically consists of a node index and incoming and outgoing edge lists.


Constructor & Destructor Documentation

RAIN.Path.PathNode.PathNode ( )

Default constructor.

RAIN.Path.PathNode.PathNode ( int  nodeIndex)

Constructor defining node index.

Parameters:
nodeIndexThe node index of the graph node

Member Function Documentation

void RAIN.Path.PathNode.AddEdgeIn ( PathEdge  edge)

Add an edge to the incoming edge list.

Parameters:
edgeThe edge to add. edge.To must equal this node's node index
void RAIN.Path.PathNode.AddEdgeOut ( PathEdge  edge)

Add an edge to the outgoing edge list.

Parameters:
edgeThe edge to add. edge.From must equal this node's node index
void RAIN.Path.PathNode.DebugDump ( )

Dump the node index and edge lists to the Logger.

PathEdge RAIN.Path.PathNode.EdgeFrom ( int  nodeIndex,
int  n 
)

Returns the nth edge from the specified node index.

Parameters:
nodeIndexThe from node index to match
nA value indicating which edge to find (0 = 1st, etc.)
Returns:
The nth edge from the specified nodeIndex
PathEdge RAIN.Path.PathNode.EdgeFrom ( int  nodeIndex)

Returns the first edge from the specified node index.

Parameters:
nodeIndexThe from node index to match
Returns:
The first edge from the specified nodeIndex
PathEdge RAIN.Path.PathNode.EdgeIn ( int  index)

Returns the incoming edge associated with the specified index.

Parameters:
indexThe index of the incoming edge to retrieve
Returns:
Returns the incoming PathEdge. Will throw an exception on an invalid index.
PathEdge RAIN.Path.PathNode.EdgeOut ( int  index)

Returns the outgoing edge associated with the specified index.

Parameters:
indexThe index of the outgoing edge to retrieve
Returns:
Returns the outgoing PathEdge. Will throw an exception on an invalid index.
PathEdge RAIN.Path.PathNode.EdgeTo ( int  nodeIndex)

Returns the first edge to the specified node index.

Parameters:
nodeIndexThe to node index to match
Returns:
The first edge to the specified nodeIndex
PathEdge RAIN.Path.PathNode.EdgeTo ( int  nodeIndex,
int  n 
)

Returns the nth edge to the specified node index.

Parameters:
nodeIndexThe to node index to match
nA value indicating which edge to find (0 = 1st, etc.)
Returns:
The nth edge to the specified nodeIndex
void RAIN.Path.PathNode.RemoveAllEdgesFrom ( int  nodeIndex)

Remove all incoming edges from the specified node.

Parameters:
nodeIndexThe node index to remove
void RAIN.Path.PathNode.RemoveAllEdgesTo ( int  nodeIndex)

Remove all outgoing edges to the specified node.

Parameters:
nodeIndexThe node index to remove

Property Documentation

int RAIN.Path.PathNode.InEdgeCount [get]

The number of incoming edges.

int RAIN.Path.PathNode.NodeIndex [get]

The index of this node.

int RAIN.Path.PathNode.OutEdgeCount [get]

The number of outgoing edges.