Changeset 956:141f9c0db4a3 in lemon for test/suurballe_test.cc
 Timestamp:
 03/06/10 15:35:12 (11 years ago)
 Branch:
 default
 Children:
 957:f802439d2b58, 959:38213abd2911, 1041:f112c18bc304
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/suurballe_test.cc
r932 r956 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 200320 095 * Copyright (C) 20032010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 82 82 typedef Digraph::Arc Arc; 83 83 typedef concepts::ReadMap<Arc, VType> LengthMap; 84 84 85 85 typedef Suurballe<Digraph, LengthMap> ST; 86 86 typedef Suurballe<Digraph, LengthMap> … … 115 115 k = suurb_test.findFlow(n, k); 116 116 suurb_test.findPaths(); 117 117 118 118 int f; 119 119 VType c; … … 127 127 k = const_suurb_test.pathNum(); 128 128 Path<Digraph> p = const_suurb_test.path(k); 129 129 130 130 ignore_unused_variable_warning(fm); 131 131 ignore_unused_variable_warning(pm); … … 209 209 { 210 210 Suurballe<ListDigraph> suurballe(digraph, length); 211 211 212 212 // Find 2 paths 213 213 check(suurballe.run(s, t) == 2, "Wrong number of paths"); … … 220 220 for (int i = 0; i < suurballe.pathNum(); ++i) 221 221 check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); 222 222 223 223 // Find 3 paths 224 224 check(suurballe.run(s, t, 3) == 3, "Wrong number of paths"); … … 231 231 for (int i = 0; i < suurballe.pathNum(); ++i) 232 232 check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); 233 233 234 234 // Find 5 paths (only 3 can be found) 235 235 check(suurballe.run(s, t, 5) == 3, "Wrong number of paths"); … … 243 243 check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); 244 244 } 245 245 246 246 // Check fullInit() + start() 247 247 { 248 248 Suurballe<ListDigraph> suurballe(digraph, length); 249 249 suurballe.fullInit(s); 250 250 251 251 // Find 2 paths 252 252 check(suurballe.start(t) == 2, "Wrong number of paths");
Note: See TracChangeset
for help on using the changeset viewer.