src/hugo/mincostflows.h
changeset 755 a8c2e828ce0b
parent 634 aacabcd724f0
child 758 49b1a30c4dc4
equal deleted inserted replaced
3:711a549bd6da 4:202b0a405e57
     9 
     9 
    10 #include <hugo/dijkstra.h>
    10 #include <hugo/dijkstra.h>
    11 #include <hugo/graph_wrapper.h>
    11 #include <hugo/graph_wrapper.h>
    12 #include <hugo/maps.h>
    12 #include <hugo/maps.h>
    13 #include <vector>
    13 #include <vector>
    14 #include <for_each_macros.h>
    14 #include <hugo/for_each_macros.h>
    15 
    15 
    16 namespace hugo {
    16 namespace hugo {
    17 
    17 
    18 /// \addtogroup galgs
    18 /// \addtogroup galgs
    19 /// @{
    19 /// @{
    88     //auxiliary variables
    88     //auxiliary variables
    89 
    89 
    90     //To store the flow
    90     //To store the flow
    91     EdgeIntMap flow; 
    91     EdgeIntMap flow; 
    92     //To store the potentila (dual variables)
    92     //To store the potentila (dual variables)
    93     typename Graph::template NodeMap<Length> potential;
    93     typedef typename Graph::template NodeMap<Length> PotentialMap;
       
    94     PotentialMap potential;
    94     
    95     
    95 
    96 
    96     Length total_length;
    97     Length total_length;
    97 
    98 
    98 
    99 
   182     ///be called before using this function.
   183     ///be called before using this function.
   183     const EdgeIntMap &getFlow() const { return flow;}
   184     const EdgeIntMap &getFlow() const { return flow;}
   184 
   185 
   185   ///Returns a const reference to the NodeMap \c potential (the dual solution).
   186   ///Returns a const reference to the NodeMap \c potential (the dual solution).
   186     /// \pre \ref run() must be called before using this function.
   187     /// \pre \ref run() must be called before using this function.
   187     const EdgeIntMap &getPotential() const { return potential;}
   188     const PotentialMap &getPotential() const { return potential;}
   188 
   189 
   189     ///This function checks, whether the given solution is optimal
   190     ///This function checks, whether the given solution is optimal
   190     ///Running after a \c run() should return with true
   191     ///Running after a \c run() should return with true
   191     ///In this "state of the art" this only check optimality, doesn't bother with feasibility
   192     ///In this "state of the art" this only check optimality, doesn't bother with feasibility
   192     ///
   193     ///