Simplicity means that the way to change the types defined in the traits class is based on functions that returns the new class and not on templatable built-in classes. When using the plain DagShortestPath the new class with the modified type comes from the original class by using the :: operator. In the case of DagShortestPathWizard only a function have to be called and it will return the needed class.
It does not have own run method. When its run method is called it initiates a plain DagShortestPath class, and calls the DagShortestPath::run() method of it. #include <lemon/dag_shortest_path.h>
Public Member Functions | |
| DagShortestPathWizard () | |
| Constructor. | |
| DagShortestPathWizard (const Graph &graph, const LengthMap &length, Node source=INVALID) | |
| Constructor that requires parameters. | |
| DagShortestPathWizard (const _Traits &b) | |
| Copy constructor. | |
| void | run () |
| Runs DagShortestPath algorithm from a given node. | |
| void | run (Node source) |
| Runs DagShortestPath algorithm from the given node. | |
| template<class T > | |
| DagShortestPathWizard < DefPredMapBase< T > > | predMap (const T &t) |
| template<class T > | |
| DagShortestPathWizard < DefDistMapBase< T > > | distMap (const T &t) |
| template<class T > | |
| DagShortestPathWizard < DefOperationTraitsBase< T > > | distMap () |
| DagShortestPathWizard< _Traits > & | source (Node source) |
| Sets the source node, from which the DagShortestPath algorithm runs. | |
Private Types | |
| typedef _Traits::Graph | Graph |
| The type of the underlying graph. | |
| typedef _Traits::LengthMap | LengthMap |
| The type of the map that stores the edge lengths. | |
| typedef LengthMap::Value | Value |
| The type of the length of the edges. | |
| typedef _Traits::PredMap | PredMap |
| The type of the map that stores the last edges of the shortest paths. | |
| typedef _Traits::DistMap | DistMap |
| The type of the map that stores the dists of the nodes. | |
| DagShortestPathWizard | ( | const Graph & | graph, | |
| const LengthMap & | length, | |||
| Node | source = INVALID | |||
| ) | [inline] |
Constructor that requires parameters. These parameters will be the default values for the traits class.
| void run | ( | ) | [inline] |
Runs DagShortestPath algorithm from a given node. The node can be given by the source function.
| void run | ( | Node | source | ) | [inline] |
Runs DagShortestPath algorithm from the given node.
| source | is the given source. |
| DagShortestPathWizard<DefPredMapBase<T> > predMap | ( | const T & | t | ) | [inline] |
Named parameter function for setting PredMap type
| DagShortestPathWizard<DefDistMapBase<T> > distMap | ( | const T & | t | ) | [inline] |
Named parameter function for setting DistMap type
| DagShortestPathWizard<DefOperationTraitsBase<T> > distMap | ( | ) | [inline] |
Named parameter function for setting OperationTraits type
| DagShortestPathWizard<_Traits>& source | ( | Node | source | ) | [inline] |
Sets the source node, from which the DagShortestPath algorithm runs.
| source | is the source node. |
1.5.9