COIN-OR::LEMON - Graph Library

Changeset 2579:691ce54544c5 in lemon-0.x


Ignore:
Timestamp:
02/25/08 13:35:06 (17 years ago)
Author:
Peter Kovacs
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3461
Message:

Bug fixes in min cost flow files.
Use enum type instead of static constants in NetworkSimplex? to avoid
linker errors.

Location:
lemon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lemon/min_cost_flow.h

    r2576 r2579  
    9797    MinCostFlow( const Graph &graph,
    9898                 const CapacityMap &capacity,
    99                  const CostMap &_ost,
     99                 const CostMap &cost,
    100100                 const SupplyMap &supply ) :
    101101      MinCostFlowImpl(graph, capacity, cost, supply) {}
     
    105105                 const LowerMap &lower,
    106106                 const CapacityMap &capacity,
    107                  const CostMap &_ost,
     107                 const CostMap &cost,
    108108                 Node s, Node t,
    109109                 Supply flow_value ) :
  • lemon/min_cost_max_flow.h

    r2576 r2579  
    141141    /// \pre \ref run() must be called before using this function.
    142142    const FlowMap& flowMap() const {
    143       return _flow_result;
     143      return _flow;
    144144    }
    145145
     
    152152    /// \pre \ref run() must be called before using this function.
    153153    const PotentialMap& potentialMap() const {
    154       return _potential_result;
     154      return _potential;
    155155    }
    156156
     
    163163    Cost totalCost() const {
    164164      Cost c = 0;
    165       for (typename Graph::EdgeIt e(graph); e != INVALID; ++e)
     165      for (typename Graph::EdgeIt e(_graph); e != INVALID; ++e)
    166166        c += _flow[e] * _cost[e];
    167167      return c;
  • lemon/network_simplex.h

    r2575 r2579  
    135135                      const SCostMap &cost_map,
    136136                      const SPotentialMap &pot_map ) :
    137         _gr(gr), _cost_map(cost_map), _pot_map(pm) {}
     137        _gr(gr), _cost_map(cost_map), _pot_map(pot_map) {}
    138138
    139139      ///\e
     
    420420  private:
    421421
    422     // State constant for edges at their lower bounds.
    423     static const int STATE_LOWER =  1;
    424     // State constant for edges in the spanning tree.
    425     static const int STATE_TREE  =  0;
    426     // State constant for edges at their upper bounds.
    427     static const int STATE_UPPER = -1;
     422    // State constants for edges
     423    enum EdgeStateEnum {
     424      STATE_UPPER = -1,
     425      STATE_TREE  =  0,
     426      STATE_LOWER =  1
     427    };
    428428
    429429    // Constant for the combined pivot rule.
Note: See TracChangeset for help on using the changeset viewer.