Changeset 440:88ed40ad0d4f in lemon-main for test/suurballe_test.cc
- Timestamp:
- 01/01/09 00:00:00 (16 years ago)
- Branch:
- default
- Children:
- 445:75a5df083951, 503:9605e051942f
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/suurballe_test.cc
r423 r440 1 /* -*- C++-*-1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 2 * 3 * This file is a part of LEMON, a generic C++ optimization library 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-200 85 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 73 73 // Check the feasibility of the flow 74 74 template <typename Digraph, typename FlowMap> 75 bool checkFlow( const Digraph& gr, const FlowMap& flow, 75 bool checkFlow( const Digraph& gr, const FlowMap& flow, 76 76 typename Digraph::Node s, typename Digraph::Node t, 77 77 int value ) … … 96 96 97 97 // Check the optimalitiy of the flow 98 template < typename Digraph, typename CostMap, 98 template < typename Digraph, typename CostMap, 99 99 typename FlowMap, typename PotentialMap > 100 100 bool checkOptimality( const Digraph& gr, const CostMap& cost, … … 145 145 node("target", target). 146 146 run(); 147 147 148 148 // Find 2 paths 149 149 { … … 153 153 "The flow is not feasible"); 154 154 check(suurballe.totalLength() == 510, "The flow is not optimal"); 155 check(checkOptimality(digraph, length, suurballe.flowMap(), 155 check(checkOptimality(digraph, length, suurballe.flowMap(), 156 156 suurballe.potentialMap()), 157 157 "Wrong potentials"); … … 168 168 "The flow is not feasible"); 169 169 check(suurballe.totalLength() == 1040, "The flow is not optimal"); 170 check(checkOptimality(digraph, length, suurballe.flowMap(), 170 check(checkOptimality(digraph, length, suurballe.flowMap(), 171 171 suurballe.potentialMap()), 172 172 "Wrong potentials"); … … 183 183 "The flow is not feasible"); 184 184 check(suurballe.totalLength() == 1040, "The flow is not optimal"); 185 check(checkOptimality(digraph, length, suurballe.flowMap(), 185 check(checkOptimality(digraph, length, suurballe.flowMap(), 186 186 suurballe.potentialMap()), 187 187 "Wrong potentials");
Note: See TracChangeset
for help on using the changeset viewer.