COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
10/26/05 13:10:18 (19 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2273
Message:

Upgrading tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/all_pairs_shortest_path_test.cc

    r1732 r1745  
    99#include <lemon/floyd_warshall.h>
    1010#include <lemon/johnson.h>
     11
     12#include <lemon/fib_heap.h>
    1113
    1214#include <lemon/time_measure.h>
     
    5759  }
    5860
     61  typedef FibHeap<Node, double, Graph::NodeMap<int> > DoubleFibHeap;
     62  Johnson<Graph, LengthMap>::DefStandardHeap<DoubleFibHeap>
     63    ::Create fibJohnson(graph, length);
     64  {
     65    Timer timer;
     66    fibJohnson.run();
     67    cout << "Johnson with fibonacci heap: " << timer << endl;
     68  }
     69
    5970  FloydWarshall<Graph, LengthMap> floyd(graph, length);
    6071  {
     
    6879      check(johnson.connected(it, jt) == floyd.connected(it, jt),
    6980            "Wrong connection in all pairs shortest path");
     81      check(johnson.connected(it, jt) == fibJohnson.connected(it, jt),
     82            "Wrong connection in all pairs shortest path");
    7083      if (johnson.connected(it, jt)) {
    7184        check(johnson.dist(it, jt) == floyd.dist(it, jt),
     85              "Wrong distance in all pairs shortest path");
     86        check(johnson.dist(it, jt) == fibJohnson.dist(it, jt),
    7287              "Wrong distance in all pairs shortest path");
    7388        if (it != jt) {
     
    7590                johnson.dist(it, johnson.predNode(it, jt)) +
    7691                length[johnson.pred(it, jt)],
     92                "Wrong edge in all pairs shortest path");
     93          check(fibJohnson.dist(it, jt) ==
     94                fibJohnson.dist(it, fibJohnson.predNode(it, jt)) +
     95                length[fibJohnson.pred(it, jt)],
    7796                "Wrong edge in all pairs shortest path");
    7897          check(floyd.dist(it, jt) ==
Note: See TracChangeset for help on using the changeset viewer.