test/hao_orlin_test.cc
changeset 1095 ad40f7d32846
parent 1008 d216e1c8b3fa
parent 1083 3e711ee55d31
child 1092 dceba191c00d
     1.1 --- a/test/hao_orlin_test.cc	Fri Aug 09 11:07:27 2013 +0200
     1.2 +++ b/test/hao_orlin_test.cc	Sun Aug 11 15:28:12 2013 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2010
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -84,7 +84,7 @@
    1.13  }
    1.14  
    1.15  template <typename Graph, typename CapMap, typename CutMap>
    1.16 -typename CapMap::Value 
    1.17 +typename CapMap::Value
    1.18    cutValue(const Graph& graph, const CapMap& cap, const CutMap& cut)
    1.19  {
    1.20    typename CapMap::Value sum = 0;
    1.21 @@ -111,7 +111,7 @@
    1.22      HaoOrlin<SmartDigraph> ho(graph, cap1);
    1.23      ho.run();
    1.24      ho.minCutMap(cut);
    1.25 -    
    1.26 +
    1.27      check(ho.minCutValue() == 1, "Wrong cut value");
    1.28      check(ho.minCutValue() == cutValue(graph, cap1, cut), "Wrong cut value");
    1.29    }
    1.30 @@ -127,19 +127,19 @@
    1.31      HaoOrlin<SmartDigraph> ho(graph, cap3);
    1.32      ho.run();
    1.33      ho.minCutMap(cut);
    1.34 -    
    1.35 +
    1.36      check(ho.minCutValue() == 1, "Wrong cut value");
    1.37      check(ho.minCutValue() == cutValue(graph, cap3, cut), "Wrong cut value");
    1.38    }
    1.39 -  
    1.40 +
    1.41    typedef Undirector<SmartDigraph> UGraph;
    1.42    UGraph ugraph(graph);
    1.43 -  
    1.44 +
    1.45    {
    1.46      HaoOrlin<UGraph, SmartDigraph::ArcMap<int> > ho(ugraph, cap1);
    1.47      ho.run();
    1.48      ho.minCutMap(cut);
    1.49 -    
    1.50 +
    1.51      check(ho.minCutValue() == 2, "Wrong cut value");
    1.52      check(ho.minCutValue() == cutValue(ugraph, cap1, cut), "Wrong cut value");
    1.53    }
    1.54 @@ -147,7 +147,7 @@
    1.55      HaoOrlin<UGraph, SmartDigraph::ArcMap<int> > ho(ugraph, cap2);
    1.56      ho.run();
    1.57      ho.minCutMap(cut);
    1.58 -    
    1.59 +
    1.60      check(ho.minCutValue() == 5, "Wrong cut value");
    1.61      check(ho.minCutValue() == cutValue(ugraph, cap2, cut), "Wrong cut value");
    1.62    }
    1.63 @@ -155,7 +155,7 @@
    1.64      HaoOrlin<UGraph, SmartDigraph::ArcMap<int> > ho(ugraph, cap3);
    1.65      ho.run();
    1.66      ho.minCutMap(cut);
    1.67 -    
    1.68 +
    1.69      check(ho.minCutValue() == 5, "Wrong cut value");
    1.70      check(ho.minCutValue() == cutValue(ugraph, cap3, cut), "Wrong cut value");
    1.71    }