test/gomory_hu_test.cc
branch1.1
changeset 1081 f1398882a928
parent 643 293551ad254f
child 1172 c18ed26f016c
     1.1 --- a/test/gomory_hu_test.cc	Fri Aug 05 09:33:42 2011 +0200
     1.2 +++ b/test/gomory_hu_test.cc	Mon Aug 08 12:36:16 2011 +0200
     1.3 @@ -1,3 +1,21 @@
     1.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
     1.5 + *
     1.6 + * This file is a part of LEMON, a generic C++ optimization library.
     1.7 + *
     1.8 + * Copyright (C) 2003-2011
     1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 + *
    1.12 + * Permission to use, modify and distribute this software is granted
    1.13 + * provided that this copyright notice appears in all copies. For
    1.14 + * precise terms see the accompanying LICENSE file.
    1.15 + *
    1.16 + * This software is provided "AS IS" with no warranty of any kind,
    1.17 + * express or implied, and with no claim as to its suitability for any
    1.18 + * purpose.
    1.19 + *
    1.20 + */
    1.21 +
    1.22  #include <iostream>
    1.23  
    1.24  #include "test_tools.h"
    1.25 @@ -33,7 +51,7 @@
    1.26    "@attributes\n"
    1.27    "source 0\n"
    1.28    "target 3\n";
    1.29 -  
    1.30 +
    1.31  void checkGomoryHuCompile()
    1.32  {
    1.33    typedef int Value;
    1.34 @@ -69,7 +87,7 @@
    1.35  typedef Graph::NodeMap<bool> BoolNodeMap;
    1.36  
    1.37  int cutValue(const Graph& graph, const BoolNodeMap& cut,
    1.38 -	     const IntEdgeMap& capacity) {
    1.39 +             const IntEdgeMap& capacity) {
    1.40  
    1.41    int sum = 0;
    1.42    for (EdgeIt e(graph); e != INVALID; ++e) {
    1.43 @@ -107,7 +125,7 @@
    1.44  
    1.45        int sum=0;
    1.46        for(GomoryHu<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a)
    1.47 -        sum+=capacity[a]; 
    1.48 +        sum+=capacity[a];
    1.49        check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt");
    1.50  
    1.51        sum=0;
    1.52 @@ -118,6 +136,6 @@
    1.53        check(sum == countNodes(graph), "Problem with MinCutNodeIt");
    1.54      }
    1.55    }
    1.56 -  
    1.57 +
    1.58    return 0;
    1.59  }