Public Member Functions | Private Types

DijkstraWizard< TR > Class Template Reference


Detailed Description

template<class TR>
class lemon::DijkstraWizard< TR >

This auxiliary class is created to implement the function-type interface of Dijkstra algorithm. It does not have own run() method, it uses the functions and features of the plain Dijkstra.

This class should only be used through the dijkstra() function, which makes it easier to use the algorithm.

#include <lemon/dijkstra.h>

List of all members.

Public Member Functions

 DijkstraWizard ()
 Constructor.
 DijkstraWizard (const Digraph &g, const LengthMap &l)
 Constructor that requires parameters.
 DijkstraWizard (const TR &b)
 Copy constructor.
void run (Node s)
 Runs Dijkstra algorithm from the given source node.
bool run (Node s, Node t)
 Finds the shortest path between s and t.
template<class T >
DijkstraWizard< SetPredMapBase
< T > > 
predMap (const T &t)
template<class T >
DijkstraWizard< SetDistMapBase
< T > > 
distMap (const T &t)
template<class T >
DijkstraWizard
< SetProcessedMapBase< T > > 
processedMap (const T &t)
template<class T >
DijkstraWizard< SetPathBase< T > > path (const T &t)
DijkstraWizard dist (const Value &d)

Private Types

typedef TR::Digraph Digraph
 The type of the digraph the algorithm runs on.
typedef TR::LengthMap LengthMap
 The type of the map that stores the arc lengths.
typedef LengthMap::Value Value
 The type of the length of the arcs.
typedef TR::PredMap PredMap
 The type of the map that stores the predecessor arcs of the shortest paths.
typedef TR::DistMap DistMap
 The type of the map that stores the distances of the nodes.
typedef TR::ProcessedMap ProcessedMap
 The type of the map that indicates which nodes are processed.
typedef TR::Path Path
 The type of the shortest paths.
typedef TR::Heap Heap
 The heap type used by the dijkstra algorithm.

Constructor & Destructor Documentation

DijkstraWizard ( const Digraph g,
const LengthMap l 
) [inline]

Constructor that requires parameters. These parameters will be the default values for the traits class.

Parameters:
gThe digraph the algorithm runs on.
lThe length map.

Member Function Documentation

void run ( Node  s) [inline]

This method runs Dijkstra algorithm from the given source node in order to compute the shortest path to each node.

bool run ( Node  s,
Node  t 
) [inline]

This method runs the Dijkstra algorithm from node s in order to compute the shortest path to node t (it stops searching when t is processed).

Returns:
true if t is reachable form s.
DijkstraWizard<SetPredMapBase<T> > predMap ( const T &  t) [inline]

Named parameter for setting PredMap object.

DijkstraWizard<SetDistMapBase<T> > distMap ( const T &  t) [inline]

Named parameter for setting DistMap object.

DijkstraWizard<SetProcessedMapBase<T> > processedMap ( const T &  t) [inline]

Named parameter for setting ProcessedMap object.

DijkstraWizard<SetPathBase<T> > path ( const T &  t) [inline]

Named parameter for getting the shortest path to the target node.

DijkstraWizard dist ( const Value d) [inline]

Named parameter for getting the distance of the target node.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines