Parameter reordering
authordeba
Fri, 06 Apr 2007 22:50:27 +0000
changeset 2417113d381c9160
parent 2416 261b4701405d
child 2418 89cbf0a2ed57
Parameter reordering

Patch from Kovacs Peter
lemon/dimacs.h
tools/dim_to_lgf.cc
     1.1 --- a/lemon/dimacs.h	Fri Mar 30 14:17:28 2007 +0000
     1.2 +++ b/lemon/dimacs.h	Fri Apr 06 22:50:27 2007 +0000
     1.3 @@ -54,14 +54,15 @@
     1.4    /// \c lower, \c capacity and \c cost.
     1.5    ///
     1.6    /// \author Marton Makai and Peter Kovacs
     1.7 -  template <typename Graph, typename SupplyMap, 
     1.8 -    typename CapacityMap, typename CostMap>
     1.9 +  template <typename Graph, typename LowerMap, 
    1.10 +    typename CapacityMap, typename CostMap, 
    1.11 +    typename SupplyMap>
    1.12    void readDimacs( std::istream& is,
    1.13  		   Graph &g,
    1.14 -		   SupplyMap& supply, 
    1.15 -		   CapacityMap& lower, 
    1.16 +		   LowerMap& lower, 
    1.17  		   CapacityMap& capacity, 
    1.18 -		   CostMap& cost )
    1.19 +		   CostMap& cost,
    1.20 +		   SupplyMap& supply )
    1.21    {
    1.22      g.clear();
    1.23      std::vector<typename Graph::Node> nodes;
     2.1 --- a/tools/dim_to_lgf.cc	Fri Mar 30 14:17:28 2007 +0000
     2.2 +++ b/tools/dim_to_lgf.cc	Fri Apr 06 22:50:27 2007 +0000
     2.3 @@ -116,9 +116,9 @@
     2.4  
     2.5    if (mincostflow) {
     2.6      Graph graph;
     2.7 +    DoubleEdgeMap lower(graph), capacity(graph), cost(graph);
     2.8      DoubleNodeMap supply(graph);
     2.9 -    DoubleEdgeMap lower(graph), capacity(graph), cost(graph);
    2.10 -    readDimacs(is, graph, supply, lower, capacity, cost);
    2.11 +    readDimacs(is, graph, lower, capacity, cost, supply);
    2.12      GraphWriter<Graph>(os, graph).
    2.13        writeNodeMap("supply", supply).
    2.14        writeEdgeMap("lower", lower).