BackwardDijkstra< GraphType > Class Template Reference

Plain Dijkstra algorithm backwards implementation. More...

#include <dijkstra.h>

List of all members.

Public Member Functions

 BackwardDijkstra (GraphType &graph, unsigned int *timestamp)
 Constructor.
void buildTree (const typename GraphType::NodeIterator &t)
 Builds a backwards shortest path tree routed on a target 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 BackwardDijkstra< GraphType >

Plain Dijkstra algorithm backwards implementation.

This class supports building a full shortest path tree towards a target node t, 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 >
BackwardDijkstra< GraphType >::BackwardDijkstra ( 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 BackwardDijkstra< GraphType >::buildTree ( const typename GraphType::NodeIterator &  t  )  [inline]

Builds a backwards shortest path tree routed on a target node.

Parameters:
t The target node
template<class GraphType >
WeightType BackwardDijkstra< 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