Changeset 1081:f1398882a928 in lemon for test/gomory_hu_test.cc
- Timestamp:
- 08/08/11 12:36:16 (13 years ago)
- Branch:
- 1.1
- Phase:
- public
- Tags:
- r1.1.4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/gomory_hu_test.cc
r643 r1081 1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 * 5 * Copyright (C) 2003-2011 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). 8 * 9 * Permission to use, modify and distribute this software is granted 10 * provided that this copyright notice appears in all copies. For 11 * precise terms see the accompanying LICENSE file. 12 * 13 * This software is provided "AS IS" with no warranty of any kind, 14 * express or implied, and with no claim as to its suitability for any 15 * purpose. 16 * 17 */ 18 1 19 #include <iostream> 2 20 … … 34 52 "source 0\n" 35 53 "target 3\n"; 36 54 37 55 void checkGomoryHuCompile() 38 56 { … … 70 88 71 89 int cutValue(const Graph& graph, const BoolNodeMap& cut, 72 90 const IntEdgeMap& capacity) { 73 91 74 92 int sum = 0; … … 108 126 int sum=0; 109 127 for(GomoryHu<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) 110 sum+=capacity[a]; 128 sum+=capacity[a]; 111 129 check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); 112 130 … … 119 137 } 120 138 } 121 139 122 140 return 0; 123 141 }
Note: See TracChangeset
for help on using the changeset viewer.