Changes in / [1010:1861d5dcf312:1006:b406ed1c8603] in lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dfs.h
r1010 r956 566 566 void start(Node t) 567 567 { 568 while ( !emptyQueue() && !(*_reached)[t])568 while ( !emptyQueue() && G->target(_stack[_stack_head])!=t ) 569 569 processNextArc(); 570 570 } … … 1513 1513 /// with addSource() before using this function. 1514 1514 void start(Node t) { 1515 while ( !emptyQueue() && !(*_reached)[t])1515 while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t ) 1516 1516 processNextArc(); 1517 1517 } -
test/dfs_test.cc
r1010 r956 51 51 "@attributes\n" 52 52 "source 0\n" 53 "target 5\n" 54 "source1 6\n" 55 "target1 3\n"; 56 53 "target 5\n"; 57 54 58 55 void checkDfsCompile() … … 183 180 Digraph G; 184 181 Node s, t; 185 Node s1, t1;186 182 187 183 std::istringstream input(test_lgf); … … 189 185 node("source", s). 190 186 node("target", t). 191 node("source1", s1).192 node("target1", t1).193 187 run(); 194 188 … … 217 211 218 212 { 219 Dfs<Digraph> dfs(G);220 check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");221 }222 223 {224 213 NullMap<Node,Arc> myPredMap; 225 214 dfs(G).predMap(myPredMap).run(s);
Note: See TracChangeset
for help on using the changeset viewer.