COIN-OR::LEMON - Graph Library

Changeset 956:141f9c0db4a3 in lemon for test/suurballe_test.cc


Ignore:
Timestamp:
03/06/10 15:35:12 (14 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
957:f802439d2b58, 959:38213abd2911, 1041:f112c18bc304
Phase:
public
Message:

Unify the sources (#339)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/suurballe_test.cc

    r932 r956  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    8282  typedef Digraph::Arc Arc;
    8383  typedef concepts::ReadMap<Arc, VType> LengthMap;
    84  
     84
    8585  typedef Suurballe<Digraph, LengthMap> ST;
    8686  typedef Suurballe<Digraph, LengthMap>
     
    115115  k = suurb_test.findFlow(n, k);
    116116  suurb_test.findPaths();
    117  
     117
    118118  int f;
    119119  VType c;
     
    127127  k = const_suurb_test.pathNum();
    128128  Path<Digraph> p = const_suurb_test.path(k);
    129  
     129
    130130  ignore_unused_variable_warning(fm);
    131131  ignore_unused_variable_warning(pm);
     
    209209  {
    210210    Suurballe<ListDigraph> suurballe(digraph, length);
    211    
     211
    212212    // Find 2 paths
    213213    check(suurballe.run(s, t) == 2, "Wrong number of paths");
     
    220220    for (int i = 0; i < suurballe.pathNum(); ++i)
    221221      check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    222    
     222
    223223    // Find 3 paths
    224224    check(suurballe.run(s, t, 3) == 3, "Wrong number of paths");
     
    231231    for (int i = 0; i < suurballe.pathNum(); ++i)
    232232      check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    233    
     233
    234234    // Find 5 paths (only 3 can be found)
    235235    check(suurballe.run(s, t, 5) == 3, "Wrong number of paths");
     
    243243      check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    244244  }
    245  
     245
    246246  // Check fullInit() + start()
    247247  {
    248248    Suurballe<ListDigraph> suurballe(digraph, length);
    249249    suurballe.fullInit(s);
    250    
     250
    251251    // Find 2 paths
    252252    check(suurballe.start(t) == 2, "Wrong number of paths");
Note: See TracChangeset for help on using the changeset viewer.