Changeset 585:65fbcf2f978a in lemon1.2 for test/dijkstra_test.cc
 Timestamp:
 04/15/09 03:26:45 (11 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/dijkstra_test.cc
r440 r585 61 61 62 62 Digraph G; 63 Node s, t ;63 Node s, t, n; 64 64 Arc e; 65 65 VType l; 66 int i; 66 67 bool b; 67 68 DType::DistMap d(G); … … 69 70 LengthMap length; 70 71 Path<Digraph> pp; 72 concepts::ReadMap<Node,bool> nm; 71 73 72 74 { 73 75 DType dijkstra_test(G,length); 76 const DType& const_dijkstra_test = dijkstra_test; 74 77 75 78 dijkstra_test.run(s); 76 79 dijkstra_test.run(s,t); 80 81 dijkstra_test.init(); 82 dijkstra_test.addSource(s); 83 dijkstra_test.addSource(s, 1); 84 n = dijkstra_test.processNextNode(); 85 n = const_dijkstra_test.nextNode(); 86 b = const_dijkstra_test.emptyQueue(); 87 i = const_dijkstra_test.queueSize(); 88 89 dijkstra_test.start(); 90 dijkstra_test.start(t); 91 dijkstra_test.start(nm); 92 93 l = const_dijkstra_test.dist(t); 94 e = const_dijkstra_test.predArc(t); 95 s = const_dijkstra_test.predNode(t); 96 b = const_dijkstra_test.reached(t); 97 b = const_dijkstra_test.processed(t); 98 d = const_dijkstra_test.distMap(); 99 p = const_dijkstra_test.predMap(); 100 pp = const_dijkstra_test.path(t); 101 l = const_dijkstra_test.currentDist(t); 102 } 103 { 104 DType 105 ::SetPredMap<concepts::ReadWriteMap<Node,Arc> > 106 ::SetDistMap<concepts::ReadWriteMap<Node,VType> > 107 ::SetStandardProcessedMap 108 ::SetProcessedMap<concepts::WriteMap<Node,bool> > 109 ::SetOperationTraits<DijkstraDefaultOperationTraits<VType> > 110 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 111 ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 112 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> >, 113 concepts::ReadWriteMap<Node,int> > 114 ::Create dijkstra_test(G,length); 115 116 LengthMap length_map; 117 concepts::ReadWriteMap<Node,Arc> pred_map; 118 concepts::ReadWriteMap<Node,VType> dist_map; 119 concepts::WriteMap<Node,bool> processed_map; 120 concepts::ReadWriteMap<Node,int> heap_cross_ref; 121 BinHeap<VType, concepts::ReadWriteMap<Node,int> > heap(heap_cross_ref); 122 123 dijkstra_test 124 .lengthMap(length_map) 125 .predMap(pred_map) 126 .distMap(dist_map) 127 .processedMap(processed_map) 128 .heap(heap, heap_cross_ref); 129 130 dijkstra_test.run(s); 131 dijkstra_test.run(s,t); 132 133 dijkstra_test.addSource(s); 134 dijkstra_test.addSource(s, 1); 135 n = dijkstra_test.processNextNode(); 136 n = dijkstra_test.nextNode(); 137 b = dijkstra_test.emptyQueue(); 138 i = dijkstra_test.queueSize(); 139 140 dijkstra_test.start(); 141 dijkstra_test.start(t); 142 dijkstra_test.start(nm); 77 143 78 144 l = dijkstra_test.dist(t); … … 80 146 s = dijkstra_test.predNode(t); 81 147 b = dijkstra_test.reached(t); 82 d = dijkstra_test.distMap(); 83 p = dijkstra_test.predMap(); 148 b = dijkstra_test.processed(t); 84 149 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<DijkstraDefaultOperationTraits<VType> > 93 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 94 ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 95 ::Create dijkstra_test(G,length); 96 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); 150 l = dijkstra_test.currentDist(t); 105 151 } 106 152
Note: See TracChangeset
for help on using the changeset viewer.