libmove3d
3.13.0
|
Public Member Functions | |
Dfs () | |
Default constructor. | |
virtual | ~Dfs () |
Default destructor. | |
virtual void * | p3d_dfs (void *graph, void *node)=0 |
The user have to call this function to use the DFS alogorithm. | |
Protected Member Functions | |
virtual void | deleteNodeList (void)=0 |
Delete the node list (private attribute) | |
virtual void | initGraph (void *graph)=0 |
Initialize dfs attributes for all the graph nodes. | |
virtual void | setDiscovered (void *node, bool value)=0 |
Set the given nodes discovered variable to value. | |
virtual bool | getDiscovered (void *node)=0 |
Get the given nodes discovered variable value. | |
virtual void | setProceeded (void *node, bool value)=0 |
Set the given nodes processed variable to value. | |
virtual bool | getProceeded (void *node)=0 |
Get the given nodes processed variable value. | |
virtual void | processNode (void *node)=0 |
This function determines the action to do on the found node. | |
virtual void | processEdge (void *edge, int id)=0 |
This function determines the action to do on the found edge. | |
virtual int | getNodeNbEdges (void *node)=0 |
Get the number of edges connecting this node his neigbours. | |
virtual void * | getEdgeNode (void *node, int id)=0 |
Get the id'th edge on the nodes edges list. | |
virtual bool | validEdge (void *edge, int id)=0 |
Check if the edge is valid or not. | |
void | deepFirstSearch (void *graph, void *node) |
Deep-First Search main function. This fuction is used to search nodes in the graph connected to the given node througth one or more valid edges. | |
Protected Attributes | |
void * | _listNode |
void Dfs::deepFirstSearch | ( | void * | graph, |
void * | node | ||
) | [protected] |
Deep-First Search main function. This fuction is used to search nodes in the graph connected to the given node througth one or more valid edges.
graph | The graph to search inside |
node | The node to search from |
virtual bool Dfs::getDiscovered | ( | void * | node | ) | [protected, pure virtual] |
Get the given nodes discovered variable value.
n | The node |
Implemented in DfsDefaultGraph.
virtual void* Dfs::getEdgeNode | ( | void * | node, |
int | id | ||
) | [protected, pure virtual] |
Get the id'th edge on the nodes edges list.
n | The node |
id | The edge id in the node structure |
Implemented in DfsDefaultGraph.
virtual int Dfs::getNodeNbEdges | ( | void * | node | ) | [protected, pure virtual] |
Get the number of edges connecting this node his neigbours.
n | The node |
Implemented in DfsDefaultGraph.
virtual bool Dfs::getProceeded | ( | void * | node | ) | [protected, pure virtual] |
Get the given nodes processed variable value.
n | The node |
Implemented in DfsDefaultGraph.
virtual void Dfs::initGraph | ( | void * | graph | ) | [protected, pure virtual] |
Initialize dfs attributes for all the graph nodes.
g | the graph to initialize |
Implemented in DfsDefaultGraph.
virtual void* Dfs::p3d_dfs | ( | void * | graph, |
void * | node | ||
) | [pure virtual] |
The user have to call this function to use the DFS alogorithm.
graph | The graph to search inside |
node | The node to search from |
Implemented in DfsDefaultGraph.
virtual void Dfs::processEdge | ( | void * | edge, |
int | id | ||
) | [protected, pure virtual] |
This function determines the action to do on the found edge.
n | The node |
id | The edge id in the node structure |
Implemented in DfsDefaultGraph.
virtual void Dfs::processNode | ( | void * | node | ) | [protected, pure virtual] |
This function determines the action to do on the found node.
n | The node |
Implemented in DfsDefaultGraph.
virtual void Dfs::setDiscovered | ( | void * | node, |
bool | value | ||
) | [protected, pure virtual] |
Set the given nodes discovered variable to value.
n | The node |
value | The value |
Implemented in DfsDefaultGraph.
virtual void Dfs::setProceeded | ( | void * | node, |
bool | value | ||
) | [protected, pure virtual] |
Set the given nodes processed variable to value.
n | The node |
value | The value |
Implemented in DfsDefaultGraph.
virtual bool Dfs::validEdge | ( | void * | edge, |
int | id | ||
) | [protected, pure virtual] |
Check if the edge is valid or not.
n | The node |
id | The edge id in the node structure |
Implemented in DfsDefaultGraph.