Dijkstra< GraphType > Class Template Reference

Plain Dijkstra algorithm implementation. More...

#include <dijkstra.h>

List of all members.

Public Member Functions

 Dijkstra (GraphType &graph, unsigned int *timestamp)
 Constructor.
void buildTree (const typename GraphType::NodeIterator &s)
 Builds a shortest path tree routed on a source node.
WeightType runQuery (const typename GraphType::NodeIterator &s, const typename GraphType::NodeIterator &t)
 Runs a shortest path query between a source node s and a target node t.

Detailed Description

template<class GraphType>
class Dijkstra< GraphType >

Plain Dijkstra algorithm implementation.

This class supports building a full shortest path tree from a source node s, or running queries between source and target nodes

Template Parameters:
GraphType The type of the graph to run the algorithm on
Author:
Panos Michail

Constructor & Destructor Documentation

template<class GraphType >
Dijkstra< GraphType >::Dijkstra ( GraphType &  graph,
unsigned int *  timestamp 
) [inline]

Constructor.

Parameters:
graph The graph to run the algorithm on
timestamp An address containing a timestamp. A timestamp must be given in order to check whether a node is visited or not

Member Function Documentation

template<class GraphType >
void Dijkstra< GraphType >::buildTree ( const typename GraphType::NodeIterator &  s  )  [inline]

Builds a shortest path tree routed on a source node.

Parameters:
s The source node
template<class GraphType >
WeightType Dijkstra< GraphType >::runQuery ( const typename GraphType::NodeIterator &  s,
const typename GraphType::NodeIterator &  t 
) [inline]

Runs a shortest path query between a source node s and a target node t.

Parameters:
s The source node
t The target node
Returns:
The distance of the target node

The documentation for this class was generated from the following file:
Generated on Mon May 21 12:41:03 2012 for Pgl by  doxygen 1.6.3