Changeset 286:da414906fe21 in lemon for test/dijkstra_test.cc
 Timestamp:
 09/26/08 12:40:11 (14 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/dijkstra_test.cc
r278 r286 23 23 #include <lemon/dijkstra.h> 24 24 #include <lemon/path.h> 25 #include <lemon/bin_heap.h> 25 26 26 27 #include "graph_test.h" … … 56 57 typedef concepts::ReadMap<Digraph::Arc,VType> LengthMap; 57 58 typedef Dijkstra<Digraph, LengthMap> DType; 59 typedef Digraph::Node Node; 60 typedef Digraph::Arc Arc; 58 61 59 62 Digraph G; 60 Digraph::Node n;61 Digraph::Arc e;63 Node s, t; 64 Arc e; 62 65 VType l; 63 66 bool b; … … 65 68 DType::PredMap p(G); 66 69 LengthMap length; 70 Path<Digraph> pp; 67 71 68 DType dijkstra_test(G,length); 72 { 73 DType dijkstra_test(G,length); 69 74 70 dijkstra_test.run(n); 75 dijkstra_test.run(s); 76 dijkstra_test.run(s,t); 71 77 72 l = dijkstra_test.dist(n); 73 e = dijkstra_test.predArc(n); 74 n = dijkstra_test.predNode(n); 75 d = dijkstra_test.distMap(); 76 p = dijkstra_test.predMap(); 77 b = dijkstra_test.reached(n); 78 l = dijkstra_test.dist(t); 79 e = dijkstra_test.predArc(t); 80 s = dijkstra_test.predNode(t); 81 b = dijkstra_test.reached(t); 82 d = dijkstra_test.distMap(); 83 p = dijkstra_test.predMap(); 84 pp = dijkstra_test.path(t); 85 } 86 { 87 DType 88 ::SetPredMap<concepts::ReadWriteMap<Node,Arc> > 89 ::SetDistMap<concepts::ReadWriteMap<Node,VType> > 90 ::SetProcessedMap<concepts::WriteMap<Node,bool> > 91 ::SetStandardProcessedMap 92 ::SetOperationTraits<DijkstraWidestPathOperationTraits<VType> > 93 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 94 ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 95 ::Create dijkstra_test(G,length); 78 96 79 Path<Digraph> pp = dijkstra_test.path(n); 97 dijkstra_test.run(s); 98 dijkstra_test.run(s,t); 99 100 l = dijkstra_test.dist(t); 101 e = dijkstra_test.predArc(t); 102 s = dijkstra_test.predNode(t); 103 b = dijkstra_test.reached(t); 104 pp = dijkstra_test.path(t); 105 } 106 80 107 } 81 108
Note: See TracChangeset
for help on using the changeset viewer.