changeset 220 | a5d8c039f218 |
parent 209 | 765619b7cbb2 |
child 257 | 8d76a7bf9961 |
3:8e576f772481 | 4:6e4501e2a0ee |
---|---|
52 "6\n" |
52 "6\n" |
53 "7\n" |
53 "7\n" |
54 "8\n" |
54 "8\n" |
55 "9\n" |
55 "9\n" |
56 "@arcs\n" |
56 "@arcs\n" |
57 " label capacity\n" |
57 " label capacity\n" |
58 "0 5 0 94\n" |
58 "0 5 0 94\n" |
59 "3 9 1 11\n" |
59 "3 9 1 11\n" |
60 "8 7 2 83\n" |
60 "8 7 2 83\n" |
61 "1 2 3 94\n" |
61 "1 2 3 94\n" |
62 "5 7 4 35\n" |
62 "5 7 4 35\n" |
63 "7 4 5 84\n" |
63 "7 4 5 84\n" |
64 "9 5 6 38\n" |
64 "9 5 6 38\n" |
65 "0 4 7 96\n" |
65 "0 4 7 96\n" |
66 "6 7 8 6\n" |
66 "6 7 8 6\n" |
67 "3 1 9 27\n" |
67 "3 1 9 27\n" |
68 "5 2 10 77\n" |
68 "5 2 10 77\n" |
69 "5 6 11 69\n" |
69 "5 6 11 69\n" |
70 "6 5 12 41\n" |
70 "6 5 12 41\n" |
71 "4 6 13 70\n" |
71 "4 6 13 70\n" |
72 "3 2 14 45\n" |
72 "3 2 14 45\n" |
73 "7 9 15 93\n" |
73 "7 9 15 93\n" |
74 "5 9 16 50\n" |
74 "5 9 16 50\n" |
75 "9 0 17 94\n" |
75 "9 0 17 94\n" |
76 "9 6 18 67\n" |
76 "9 6 18 67\n" |
77 "0 9 19 86\n" |
77 "0 9 19 86\n" |
78 "@attributes\n" |
78 "@attributes\n" |
79 "source 3\n"; |
79 "source 3\n"; |
80 |
80 |
81 int test_seq[] = { 2, 28, 19, 27, 33, 25, 13, 41, 10, 26, 1, 9, 4, 34}; |
81 int test_seq[] = { 2, 28, 19, 27, 33, 25, 13, 41, 10, 26, 1, 9, 4, 34}; |
82 int test_inc[] = {20, 28, 34, 16, 0, 46, 44, 0, 42, 32, 14, 8, 6, 37}; |
82 int test_inc[] = {20, 28, 34, 16, 0, 46, 44, 0, 42, 32, 14, 8, 6, 37}; |
139 for(ArcIt a(digraph); a != INVALID; ++a) { |
139 for(ArcIt a(digraph); a != INVALID; ++a) { |
140 Node s = digraph.source(a); |
140 Node s = digraph.source(a); |
141 Node t = digraph.target(a); |
141 Node t = digraph.target(a); |
142 if (dijkstra.reached(s)) { |
142 if (dijkstra.reached(s)) { |
143 check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a], |
143 check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a], |
144 "Error in a shortest path tree!"); |
144 "Error in a shortest path tree!"); |
145 } |
145 } |
146 } |
146 } |
147 |
147 |
148 for(NodeIt n(digraph); n != INVALID; ++n) { |
148 for(NodeIt n(digraph); n != INVALID; ++n) { |
149 if ( dijkstra.reached(n) && dijkstra.predArc(n) != INVALID ) { |
149 if ( dijkstra.reached(n) && dijkstra.predArc(n) != INVALID ) { |