#include <lemon/bellman_ford.h>
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 BellmanFord the new class with the modified type comes from the original class by using the :: operator. In the case of BellmanFordWizard 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 BellmanFord class, and calls the BellmanFord::run method of it.
Public Member Functions | |
BellmanFordWizard () | |
Constructor. | |
BellmanFordWizard (const Graph &graph, const LengthMap &length, Node source=INVALID) | |
Constructor that requires parameters. | |
BellmanFordWizard (const _Traits &b) | |
Copy constructor. | |
void | run () |
Runs BellmanFord algorithm from a given node. | |
void | run (Node source) |
Runs BellmanFord algorithm from the given node. | |
template<class T> | |
BellmanFordWizard< DefPredMapBase< T > > | predMap (const T &t) |
Named parameter function for setting PredMap type | |
template<class T> | |
BellmanFordWizard< DefDistMapBase< T > > | distMap (const T &t) |
Named parameter function for setting DistMap type | |
template<class T> | |
BellmanFordWizard< DefOperationTraitsBase< T > > | distMap () |
Named parameter function for setting OperationTraits type | |
BellmanFordWizard< _Traits > & | source (Node source) |
Sets the source node, from which the BellmanFord algorithm runs. |
|
Constructor that requires parameters. These parameters will be the default values for the traits class. |
|
Runs BellmanFord algorithm from a given node. The node can be given by the source function. |
|
Runs BellmanFord algorithm from the given node.
|
|
Named parameter function for setting PredMap type |
|
Named parameter function for setting DistMap type |
|
Named parameter function for setting OperationTraits type |
|
Sets the source node, from which the BellmanFord algorithm runs.
|