COIN-OR::LEMON - Graph Library

Changeset 607:327f7cf13843 in lemon-0.x for src/work/athos/mincostflows.h


Ignore:
Timestamp:
05/11/04 17:42:11 (18 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@789
Message:

Finished MinLengthPaths?: a specialization of MinCostFlows?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/mincostflows.h

    r554 r607  
    99#include <iostream>
    1010#include <hugo/dijkstra.h>
    11 #include <graph_wrapper.h>
     11#include <hugo/graph_wrapper.h>
    1212#include <hugo/maps.h>
    1313#include <vector>
     
    7878
    7979
     80  protected:
    8081   
    8182    //Input
     
    8485    const CapacityMap& capacity;
    8586
     87
    8688    //auxiliary variables
    8789
     
    99101    Length total_length;
    100102
     103
    101104  public :
    102105
     
    111114    ///Returns k if there are at least k edge-disjoint paths from s to t.
    112115    ///Otherwise it returns the number of found edge-disjoint paths from s to t.
     116    ///\todo May be it does make sense to be able to start with a nonzero
     117    /// feasible primal-dual solution pair as well.
    113118    int run(Node s, Node t, int k) {
    114119
     
    186191    }
    187192
    188     //This function checks, whether the given solution is optimal
    189     //Running after a \c run() should return with true
    190     //In this "state of the art" this only check optimality, doesn't bother with feasibility
    191     bool checkSolution(){
     193    ///Returns a const reference to the EdgeMap \c flow. \pre \ref run() must
     194    ///be called before using this function.
     195    const EdgeIntMap &getFlow() const { return flow;}
     196
     197  ///Returns a const reference to the NodeMap \c potential (the dual solution).
     198    /// \pre \ref run() must be called before using this function.
     199    const EdgeIntMap &getPotential() const { return potential;}
     200
     201    ///This function checks, whether the given solution is optimal
     202    ///Running after a \c run() should return with true
     203    ///In this "state of the art" this only check optimality, doesn't bother with feasibility
     204    ///
     205    ///\todo Is this OK here?
     206    bool checkComplementarySlackness(){
    192207      Length mod_pot;
    193208      Length fl_e;
Note: See TracChangeset for help on using the changeset viewer.