Biorithm
1.1
|
An object that represents a node in a Directed Acyclic Graph (DAG). NodeInfo is a class that can store extra information for each node. More...
#include <dag.h>
Public Member Functions | |
DAGNode () | |
DAGNode (const NodeInfo &info) | |
DAGNode (const DAGNode &rhs) | |
virtual void | addChild (DAGNode< NodeInfo > *child, unsigned int type=0) |
virtual void | addParent (DAGNode< NodeInfo > *parent, unsigned int type=0) |
virtual set< DAGNode< NodeInfo > * > | getParents (unsigned int type=0) |
virtual unsigned int | getParentEdgeType (DAGNode< NodeInfo > *parent) |
set< DAGNode< NodeInfo > * > | getChildren (unsigned int type=0) |
virtual set< DAGNode< NodeInfo > * > | getAncestors (int type=0) |
virtual set< DAGNode< NodeInfo > * > | getDescendants (int type=0) |
virtual NodeInfo | getNodeInfo () const |
Return the NodeInfo stored with the DAGNode. | |
virtual NodeInfo & | getNodeInfo () |
Return a reference to the NodeInfo stored with the DAGNode. | |
virtual bool | isChild (DAGNode< NodeInfo > *node, unsigned int type=0) |
virtual bool | isParent (DAGNode< NodeInfo > *node, unsigned int type=0) |
DAGNode () | |
DAGNode (const NodeInfo &info) | |
DAGNode (const DAGNode &rhs) | |
virtual void | addChild (DAGNode< NodeInfo > *child, unsigned int type=0) |
virtual void | addParent (DAGNode< NodeInfo > *parent, unsigned int type=0) |
virtual set< DAGNode< NodeInfo > * > | getParents (unsigned int type=0) |
virtual unsigned int | getParentEdgeType (DAGNode< NodeInfo > *parent) |
set< DAGNode< NodeInfo > * > | getChildren (unsigned int type=0) |
virtual set< DAGNode< NodeInfo > * > | getAncestors (int type=0) |
virtual set< DAGNode< NodeInfo > * > | getDescendants (int type=0) |
virtual NodeInfo | getNodeInfo () const |
Return the NodeInfo stored with the DAGNode. | |
virtual NodeInfo & | getNodeInfo () |
Return a reference to the NodeInfo stored with the DAGNode. | |
virtual bool | isChild (DAGNode< NodeInfo > *node, unsigned int type=0) |
virtual bool | isParent (DAGNode< NodeInfo > *node, unsigned int type=0) |
Protected Attributes | |
set< DAGNode< NodeInfo > * > | parents [3] |
set< DAGNode< NodeInfo > * > | ancestors [3] |
set< DAGNode< NodeInfo > * > | children [3] |
set< DAGNode< NodeInfo > * > | descendants [3] |
Friends | |
class | DAG< DAGNode< NodeInfo > > |
An object that represents a node in a Directed Acyclic Graph (DAG). NodeInfo is a class that can store extra information for each node.
DAGNode< NodeInfo >::DAGNode | ( | const DAGNode< NodeInfo > & | rhs | ) | [inline] |
Copy constructor.
DAGNode< NodeInfo >::DAGNode | ( | const DAGNode< NodeInfo > & | rhs | ) | [inline] |
Copy constructor.
virtual unsigned int DAGNode< NodeInfo >::getParentEdgeType | ( | DAGNode< NodeInfo > * | parent | ) | [inline, virtual] |
Return the type of the edge between the node and the parent.
virtual unsigned int DAGNode< NodeInfo >::getParentEdgeType | ( | DAGNode< NodeInfo > * | parent | ) | [inline, virtual] |
Return the type of the edge between the node and the parent.
virtual bool DAGNode< NodeInfo >::isChild | ( | DAGNode< NodeInfo > * | node, |
unsigned int | type = 0 |
||
) | [inline, virtual] |
Returns true if and only if node is a child of the invocant.
node, a pointer to an instance of DAGNode< NodeInfo >.
virtual bool DAGNode< NodeInfo >::isChild | ( | DAGNode< NodeInfo > * | node, |
unsigned int | type = 0 |
||
) | [inline, virtual] |
Returns true if and only if node is a child of the invocant.
node, a pointer to an instance of DAGNode< NodeInfo >.
virtual bool DAGNode< NodeInfo >::isParent | ( | DAGNode< NodeInfo > * | node, |
unsigned int | type = 0 |
||
) | [inline, virtual] |
Returns true if and only if node is a parent of the invocant.
node, a pointer to an instance of DAGNode< NodeInfo >.
virtual bool DAGNode< NodeInfo >::isParent | ( | DAGNode< NodeInfo > * | node, |
unsigned int | type = 0 |
||
) | [inline, virtual] |
Returns true if and only if node is a parent of the invocant.
node, a pointer to an instance of DAGNode< NodeInfo >.