gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Bug fix in Dfs::start(s,t) (#392)
0 2 0
default
2 files changed with 14 insertions and 3 deletions:
↑ Collapse diff ↑
Ignore white space 2 line context
... ...
@@ -560,3 +560,3 @@
560 560
    {
561
      while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
561
      while ( !emptyQueue() && !(*_reached)[t] )
562 562
        processNextArc();
... ...
@@ -1513,3 +1513,3 @@
1513 1513
    void start(Node t) {
1514
      while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
1514
      while ( !emptyQueue() && !(*_reached)[t] )
1515 1515
        processNextArc();
Ignore white space 6 line context
... ...
@@ -52,3 +52,6 @@
52 52
  "source 0\n"
53
  "target 5\n";
53
  "target 5\n"
54
  "source1 6\n"
55
  "target1 3\n";
56

	
54 57

	
... ...
@@ -146,2 +149,3 @@
146 149
  Node s, t;
150
  Node s1, t1;
147 151

	
... ...
@@ -151,2 +155,4 @@
151 155
    node("target", t).
156
    node("source1", s1).
157
    node("target1", t1).
152 158
    run();
... ...
@@ -177,2 +183,7 @@
177 183
  {
184
  Dfs<Digraph> dfs(G);
185
  check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
186
  }
187
  
188
  {
178 189
    NullMap<Node,Arc> myPredMap;
0 comments (0 inline)