Test the new dijkstra features.
authoralpar
Tue, 15 Feb 2005 14:58:32 +0000
changeset 11481eea022c7a16
parent 1147 014054ffd9d2
child 1149 9058f09cac26
Test the new dijkstra features.
src/test/dijkstra_test.cc
     1.1 --- a/src/test/dijkstra_test.cc	Tue Feb 15 14:56:54 2005 +0000
     1.2 +++ b/src/test/dijkstra_test.cc	Tue Feb 15 14:58:32 2005 +0000
     1.3 @@ -17,6 +17,7 @@
     1.4  #include "test_tools.h"
     1.5  #include <lemon/smart_graph.h>
     1.6  #include <lemon/dijkstra.h>
     1.7 +#include <lemon/maps.h>
     1.8  #include <lemon/concept/graph.h>
     1.9  #include <lemon/concept/maps.h>
    1.10  using namespace lemon;
    1.11 @@ -44,7 +45,7 @@
    1.12    bool b;
    1.13    DType::DistMap d(G);
    1.14    DType::PredMap p(G);
    1.15 -  DType::PredNodeMap pn(G);
    1.16 +  //  DType::PredNodeMap pn(G);
    1.17    LengthMap cap;
    1.18  
    1.19    DType dijkstra_test(G,cap);
    1.20 @@ -56,9 +57,9 @@
    1.21    n  = dijkstra_test.predNode(n);
    1.22    d  = dijkstra_test.distMap();
    1.23    p  = dijkstra_test.predMap();
    1.24 -  pn = dijkstra_test.predNodeMap();
    1.25 +  //  pn = dijkstra_test.predNodeMap();
    1.26    b  = dijkstra_test.reached(n);
    1.27 -
    1.28 +  
    1.29  }
    1.30  
    1.31  int main()
    1.32 @@ -115,5 +116,11 @@
    1.33  			    - cap[e]));
    1.34      }
    1.35    }
    1.36 +
    1.37 +  
    1.38 +  {
    1.39 +    NullMap<Node,Node> myPredNodeMap;
    1.40 +    dijkstra(G,cap).predNodeMap(myPredNodeMap).run(s);
    1.41 +  }
    1.42 +  return 0;
    1.43  }
    1.44 -