diff -r 70b199792735 -r ad40f7d32846 test/gomory_hu_test.cc --- a/test/gomory_hu_test.cc Fri Aug 09 11:07:27 2013 +0200 +++ b/test/gomory_hu_test.cc Sun Aug 11 15:28:12 2013 +0200 @@ -1,3 +1,21 @@ +/* -*- mode: C++; indent-tabs-mode: nil; -*- + * + * This file is a part of LEMON, a generic C++ optimization library. + * + * Copyright (C) 2003-2010 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + #include #include "test_tools.h" @@ -33,7 +51,7 @@ "@attributes\n" "source 0\n" "target 3\n"; - + void checkGomoryHuCompile() { typedef int Value; @@ -70,7 +88,7 @@ typedef Graph::NodeMap BoolNodeMap; int cutValue(const Graph& graph, const BoolNodeMap& cut, - const IntEdgeMap& capacity) { + const IntEdgeMap& capacity) { int sum = 0; for (EdgeIt e(graph); e != INVALID; ++e) { @@ -108,7 +126,7 @@ int sum=0; for(GomoryHu::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) - sum+=capacity[a]; + sum+=capacity[a]; check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); sum=0; @@ -119,6 +137,6 @@ check(sum == countNodes(graph), "Problem with MinCutNodeIt"); } } - + return 0; }