gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge bugfix #392 to branch 1.0
0 2 0
merge 1.0
1 file changed with 14 insertions and 3 deletions:
↑ Collapse diff ↑
Show white space 4 line context
... ...
@@ -559,5 +559,5 @@
559 559
    void start(Node t)
560 560
    {
561
      while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
561
      while ( !emptyQueue() && !(*_reached)[t] )
562 562
        processNextArc();
563 563
    }
... ...
@@ -1513,5 +1513,5 @@
1513 1513
    /// with addSource() before using this function.
1514 1514
    void start(Node t) {
1515
      while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
1515
      while ( !emptyQueue() && !(*_reached)[t] )
1516 1516
        processNextArc();
1517 1517
    }
Show white space 4 line context
... ...
@@ -51,5 +51,8 @@
51 51
  "@attributes\n"
52 52
  "source 0\n"
53
  "target 5\n";
53
  "target 5\n"
54
  "source1 6\n"
55
  "target1 3\n";
56

	
54 57

	
55 58
void checkDfsCompile()
... ...
@@ -145,4 +148,5 @@
145 148
  Digraph G;
146 149
  Node s, t;
150
  Node s1, t1;
147 151

	
148 152
  std::istringstream input(test_lgf);
... ...
@@ -150,4 +154,6 @@
150 154
    node("source", s).
151 155
    node("target", t).
156
    node("source1", s1).
157
    node("target1", t1).
152 158
    run();
153 159

	
... ...
@@ -176,4 +182,9 @@
176 182

	
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;
179 190
    dfs(G).predMap(myPredMap).run(s);
0 comments (0 inline)