COIN-OR::LEMON - Graph Library

Changeset 2581:054566ac0934 in lemon-0.x for lemon/min_cost_flow.h


Ignore:
Timestamp:
02/28/08 03:54:27 (16 years ago)
Author:
Peter Kovacs
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3463
Message:

Query improvements in the min cost flow algorithms.

  • External flow and potential maps can be used.
  • New query functions: flow() and potential().
  • CycleCanceling? also provides dual solution (node potentials).
  • Doc improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/min_cost_flow.h

    r2579 r2581  
    4444  ///
    4545  /// There are four implementations for the minimum cost flow problem,
    46   /// which can be used exactly the same way except for the fact that
    47   /// \ref CycleCanceling does not provide dual solution (node
    48   /// potentials) since it is a pure primal method.
     46  /// which can be used exactly the same way.
    4947  /// - \ref CapacityScaling The capacity scaling algorithm.
    5048  /// - \ref CostScaling The cost scaling algorithm.
     
    6159  /// - Edge capacities and costs should be \e non-negative \e integers.
    6260  /// - Supply values should be \e signed \e integers.
    63   /// - \c LowerMap::Value must be convertible to \c CapacityMap::Value.
    64   /// - \c CapacityMap::Value and \c SupplyMap::Value must be
    65   ///   convertible to each other.
    66   /// - All value types must be convertible to \c CostMap::Value, which
    67   ///   must be signed type.
     61  /// - The value types of the maps should be convertible to each other.
     62  /// - \c CostMap::Value must be signed type.
    6863  ///
    6964  /// \author Peter Kovacs
     
    7166  template < typename Graph,
    7267             typename LowerMap = typename Graph::template EdgeMap<int>,
    73              typename CapacityMap = LowerMap,
     68             typename CapacityMap = typename Graph::template EdgeMap<int>,
    7469             typename CostMap = typename Graph::template EdgeMap<int>,
    75              typename SupplyMap = typename Graph::template NodeMap
    76                                   <typename CapacityMap::Value> >
     70             typename SupplyMap = typename Graph::template NodeMap<int> >
    7771  class MinCostFlow :
    7872    public NetworkSimplex< Graph, LowerMap, CapacityMap,
     
    8680  public:
    8781
    88     /// General constructor of the class (with lower bounds).
     82    /// General constructor (with lower bounds).
    8983    MinCostFlow( const Graph &graph,
    9084                 const LowerMap &lower,
     
    10195      MinCostFlowImpl(graph, capacity, cost, supply) {}
    10296
    103     /// Simple constructor of the class (with lower bounds).
     97    /// Simple constructor (with lower bounds).
    10498    MinCostFlow( const Graph &graph,
    10599                 const LowerMap &lower,
     
    111105                       s, t, flow_value ) {}
    112106
    113     /// Simple constructor of the class (without lower bounds).
     107    /// Simple constructor (without lower bounds).
    114108    MinCostFlow( const Graph &graph,
    115109                 const CapacityMap &capacity,
Note: See TracChangeset for help on using the changeset viewer.