ml::WEMShortestPath Class Reference

The WEMShortestPath class implements Dijkstra's shortest path algorithm for a WEM. More...

#include <WEMShortestPath.h>

List of all members.

Public Types

typedef std::vector< WEMNode * > WEMNodeVector
 Internal vector holds the temporary WEMNode front nodes.

Public Member Functions

 WEMShortestPath ()
 Default constructor.
 ~WEMShortestPath ()
 Default destructor.

Static Public Member Functions

static void shortestPath (WEMPatch *wemPatch, WEMNode *startNode, WEMNode *destNode, std::vector< unsigned int > &pathNodesEntryNumbers)
 Computes the shortest path along edges of the wemPatch, from the startNode to the destNode.


Detailed Description

The WEMShortestPath class implements Dijkstra's shortest path algorithm for a WEM.

If a start and a destination node is given, the shortest path is returned as a vector of the entry numbers of the nodes on the shortest path (including the start and destination node). Running time is O(n2) in the worst case, but the algorithm terminates if the destination node is reached.

Definition at line 34 of file WEMShortestPath.h.


Member Typedef Documentation

Internal vector holds the temporary WEMNode front nodes.

Definition at line 46 of file WEMShortestPath.h.


Constructor & Destructor Documentation

ml::WEMShortestPath::WEMShortestPath (  ) 

Default constructor.

ml::WEMShortestPath::~WEMShortestPath (  ) 

Default destructor.


Member Function Documentation

static void ml::WEMShortestPath::shortestPath ( WEMPatch wemPatch,
WEMNode startNode,
WEMNode destNode,
std::vector< unsigned int > &  pathNodesEntryNumbers 
) [static]

Computes the shortest path along edges of the wemPatch, from the startNode to the destNode.

The path is stored in pathNodesEntryNumbers, as the entry numbers of visited nodes including the start node and destination node. If for destNode a NULL pointer is provided, the path to the most distant geodetic point is calculated.


The documentation for this class was generated from the following file:

Generated on Sat Sep 3 18:39:41 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8