Changeset 278:931190050520 in lemon1.2 for test/dijkstra_test.cc
 Timestamp:
 09/22/08 15:33:23 (11 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/dijkstra_test.cc
r228 r278 21 21 #include <lemon/list_graph.h> 22 22 #include <lemon/lgf_reader.h> 23 24 23 #include <lemon/dijkstra.h> 25 24 #include <lemon/path.h> … … 65 64 DType::DistMap d(G); 66 65 DType::PredMap p(G); 67 // DType::PredNodeMap pn(G);68 66 LengthMap length; 69 67 … … 77 75 d = dijkstra_test.distMap(); 78 76 p = dijkstra_test.predMap(); 79 // pn = dijkstra_test.predNodeMap();80 77 b = dijkstra_test.reached(n); 81 78 … … 92 89 93 90 Digraph g; 94 dijkstra(g,LengthMap(),Node()).run(); 95 dijkstra(g,LengthMap()).source(Node()).run(); 91 bool b; 92 dijkstra(g,LengthMap()).run(Node()); 93 b=dijkstra(g,LengthMap()).run(Node(),Node()); 96 94 dijkstra(g,LengthMap()) 97 .predMap(concepts::WriteMap<Node,Arc>()) 98 .distMap(concepts::WriteMap<Node,VType>()) 95 .predMap(concepts::ReadWriteMap<Node,Arc>()) 96 .distMap(concepts::ReadWriteMap<Node,VType>()) 97 .processedMap(concepts::WriteMap<Node,bool>()) 99 98 .run(Node()); 99 b=dijkstra(g,LengthMap()) 100 .predMap(concepts::ReadWriteMap<Node,Arc>()) 101 .distMap(concepts::ReadWriteMap<Node,VType>()) 102 .processedMap(concepts::WriteMap<Node,bool>()) 103 .path(concepts::Path<Digraph>()) 104 .dist(VType()) 105 .run(Node(),Node()); 100 106 } 101 107 … … 123 129 124 130 Path<Digraph> p = dijkstra_test.path(t); 125 check(p.length()==3," getPath() found a wrong path.");131 check(p.length()==3,"path() found a wrong path."); 126 132 check(checkPath(G, p),"path() found a wrong path."); 127 133 check(pathSource(G, p) == s,"path() found a wrong path."); … … 133 139 check( !dijkstra_test.reached(u)  134 140 (dijkstra_test.dist(v)  dijkstra_test.dist(u) <= length[e]), 135 " dist(target)dist(source)arc_length=" <<141 "Wrong output. dist(target)dist(source)arc_length=" << 136 142 dijkstra_test.dist(v)  dijkstra_test.dist(u)  length[e]); 137 143 }
Note: See TracChangeset
for help on using the changeset viewer.