COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/18/10 14:17:03 (14 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
959:38213abd2911 (diff), 958:d6052a9c4e8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge backout of a6eb9698c321 (#360,#51)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/bellman_ford_test.cc

    r958 r960  
    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).
     
    9898    pp = const_bf_test.path(t);
    9999    pp = const_bf_test.negativeCycle();
    100    
     100
    101101    for (BF::ActiveIt it(const_bf_test); it != INVALID; ++it) {}
    102102  }
     
    110110    concepts::ReadWriteMap<Node,Arc> pred_map;
    111111    concepts::ReadWriteMap<Node,Value> dist_map;
    112    
     112
    113113    bf_test
    114114      .lengthMap(length_map)
     
    189189  check(pathSource(gr, p) == s, "path() found a wrong path.");
    190190  check(pathTarget(gr, p) == t, "path() found a wrong path.");
    191  
     191
    192192  ListPath<Digraph> path;
    193193  Value dist;
     
    228228  SmartDigraph gr;
    229229  IntArcMap length(gr);
    230  
     230
    231231  Node n1 = gr.addNode();
    232232  Node n2 = gr.addNode();
    233233  Node n3 = gr.addNode();
    234234  Node n4 = gr.addNode();
    235  
     235
    236236  Arc a1 = gr.addArc(n1, n2);
    237237  Arc a2 = gr.addArc(n2, n2);
    238  
     238
    239239  length[a1] = 2;
    240240  length[a2] = -1;
    241  
     241
    242242  {
    243243    BellmanFord<SmartDigraph, IntArcMap> bf(gr, length);
     
    247247          "Wrong negative cycle.");
    248248  }
    249  
     249
    250250  length[a2] = 0;
    251  
     251
    252252  {
    253253    BellmanFord<SmartDigraph, IntArcMap> bf(gr, length);
     
    256256          "Negative cycle should not be found.");
    257257  }
    258  
     258
    259259  length[gr.addArc(n1, n3)] = 5;
    260260  length[gr.addArc(n4, n3)] = 1;
    261261  length[gr.addArc(n2, n4)] = 2;
    262262  length[gr.addArc(n3, n2)] = -4;
    263  
     263
    264264  {
    265265    BellmanFord<SmartDigraph, IntArcMap> bf(gr, length);
  • test/bellman_ford_test.cc

    r956 r960  
    105105      ::SetDistMap<concepts::ReadWriteMap<Node,Value> >
    106106      ::SetOperationTraits<BellmanFordDefaultOperationTraits<Value> >
    107       ::SetOperationTraits<BellmanFordToleranceOperationTraits<Value, 0> >
    108107      ::Create bf_test(gr,length);
    109108
Note: See TracChangeset for help on using the changeset viewer.