libmove3d  3.13.0
Public Member Functions | Protected Member Functions | Protected Attributes
Dfs Class Reference
Inheritance diagram for Dfs:
DfsDefaultGraph

List of all members.

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

Member Function Documentation

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.

Parameters:
graphThe graph to search inside
nodeThe node to search from
virtual bool Dfs::getDiscovered ( void *  node) [protected, pure virtual]

Get the given nodes discovered variable value.

Parameters:
nThe node
Returns:
The value of discoverd variable

Implemented in DfsDefaultGraph.

virtual void* Dfs::getEdgeNode ( void *  node,
int  id 
) [protected, pure virtual]

Get the id'th edge on the nodes edges list.

Parameters:
nThe node
idThe edge id in the node structure
Returns:

Implemented in DfsDefaultGraph.

virtual int Dfs::getNodeNbEdges ( void *  node) [protected, pure virtual]

Get the number of edges connecting this node his neigbours.

Parameters:
nThe node
Returns:

Implemented in DfsDefaultGraph.

virtual bool Dfs::getProceeded ( void *  node) [protected, pure virtual]

Get the given nodes processed variable value.

Parameters:
nThe node
Returns:
The value of processed variable

Implemented in DfsDefaultGraph.

virtual void Dfs::initGraph ( void *  graph) [protected, pure virtual]

Initialize dfs attributes for all the graph nodes.

Parameters:
gthe 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.

Parameters:
graphThe graph to search inside
nodeThe node to search from
Returns:
The list of node found by the dfs

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.

Parameters:
nThe node
idThe 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.

Parameters:
nThe node

Implemented in DfsDefaultGraph.

virtual void Dfs::setDiscovered ( void *  node,
bool  value 
) [protected, pure virtual]

Set the given nodes discovered variable to value.

Parameters:
nThe node
valueThe value

Implemented in DfsDefaultGraph.

virtual void Dfs::setProceeded ( void *  node,
bool  value 
) [protected, pure virtual]

Set the given nodes processed variable to value.

Parameters:
nThe node
valueThe value

Implemented in DfsDefaultGraph.

virtual bool Dfs::validEdge ( void *  edge,
int  id 
) [protected, pure virtual]

Check if the edge is valid or not.

Parameters:
nThe node
idThe edge id in the node structure
Returns:
True if the node is valid, False otherwise

Implemented in DfsDefaultGraph.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines