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

List of all members.

Public Member Functions

 DfsDefaultGraph ()
 Default constructor.
virtual ~DfsDefaultGraph ()
 Default destructor.
void * p3d_dfs (void *graph, void *node)
 The user have to call this function to use the DFS alogorithm.

Protected Member Functions

virtual void deleteNodeList (void)
 Delete the node list (private attribute)
virtual void initGraph (void *graph)
 Initialize dfs attributes for all the graph nodes.
virtual void setDiscovered (void *node, bool value)
 Set the given nodes discovered variable to value.
virtual bool getDiscovered (void *node)
 Get the given nodes discovered variable value.
virtual void setProceeded (void *node, bool value)
 Set the given nodes processed variable to value.
virtual bool getProceeded (void *node)
 Get the given nodes processed variable value.
virtual void processNode (void *node)
 This function determines the action to do on the found node. Here we add the node to the listNode.
virtual void processEdge (void *edge, int id)
 This function determines the action to do on the found edge. Here we do nothing.
virtual int getNodeNbEdges (void *node)
 Get the number of edges connecting this node his neigbours.
virtual void * getEdgeNode (void *node, int id)
 Get the id'th edge on the nodes edges list.
virtual bool validEdge (void *edge, int id)
 Check if the edge is valid or not.

Member Function Documentation

bool DfsDefaultGraph::getDiscovered ( void *  n) [protected, virtual]

Get the given nodes discovered variable value.

Parameters:
nThe node
Returns:
The value of discoverd variable

Implements Dfs.

void * DfsDefaultGraph::getEdgeNode ( void *  n,
int  id 
) [protected, virtual]

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

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

Implements Dfs.

int DfsDefaultGraph::getNodeNbEdges ( void *  n) [protected, virtual]

Get the number of edges connecting this node his neigbours.

Parameters:
nThe node
Returns:

Implements Dfs.

bool DfsDefaultGraph::getProceeded ( void *  n) [protected, virtual]

Get the given nodes processed variable value.

Parameters:
nThe node
Returns:
The value of processed variable

Implements Dfs.

void DfsDefaultGraph::initGraph ( void *  g) [protected, virtual]

Initialize dfs attributes for all the graph nodes.

Parameters:
gthe graph to initialize

Implements Dfs.

void * DfsDefaultGraph::p3d_dfs ( void *  graph,
void *  node 
) [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

Implements Dfs.

void DfsDefaultGraph::processEdge ( void *  n,
int  id 
) [protected, virtual]

This function determines the action to do on the found edge. Here we do nothing.

Parameters:
nThe node
idThe edge id in the node structure

Implements Dfs.

void DfsDefaultGraph::processNode ( void *  n) [protected, virtual]

This function determines the action to do on the found node. Here we add the node to the listNode.

Parameters:
nThe node

Implements Dfs.

void DfsDefaultGraph::setDiscovered ( void *  n,
bool  value 
) [protected, virtual]

Set the given nodes discovered variable to value.

Parameters:
nThe node
valueThe value

Implements Dfs.

void DfsDefaultGraph::setProceeded ( void *  n,
bool  value 
) [protected, virtual]

Set the given nodes processed variable to value.

Parameters:
nThe node
valueThe value

Implements Dfs.

bool DfsDefaultGraph::validEdge ( void *  n,
int  id 
) [protected, 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

Implements Dfs.


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