gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge bugfix #366
0 1 0
merge default
1 file changed with 2 insertions and 2 deletions:
↑ Collapse diff ↑
Ignore white space 24 line context
... ...
@@ -40,25 +40,25 @@
40 40
    int length() const {
41 41
      int len = 0;
42 42
      typename Digraph::Node node = target;
43 43
      typename Digraph::Arc arc;
44 44
      while ((arc = predMap[node]) != INVALID) {
45 45
        node = digraph.source(arc);
46 46
        ++len;
47 47
      }
48 48
      return len;
49 49
    }
50 50

	
51 51
    bool empty() const {
52
      return predMap[target] != INVALID;
52
      return predMap[target] == INVALID;
53 53
    }
54 54

	
55 55
    class RevArcIt {
56 56
    public:
57 57
      RevArcIt() {}
58 58
      RevArcIt(Invalid) : path(0), current(INVALID) {}
59 59
      RevArcIt(const PredMapPath& _path)
60 60
        : path(&_path), current(_path.target) {
61 61
        if (path->predMap[current] == INVALID) current = INVALID;
62 62
      }
63 63

	
64 64
      operator const typename Digraph::Arc() const {
... ...
@@ -114,25 +114,25 @@
114 114
    int length() const {
115 115
      int len = 0;
116 116
      typename Digraph::Node node = target;
117 117
      typename Digraph::Arc arc;
118 118
      while ((arc = predMatrixMap(source, node)) != INVALID) {
119 119
        node = digraph.source(arc);
120 120
        ++len;
121 121
      }
122 122
      return len;
123 123
    }
124 124

	
125 125
    bool empty() const {
126
      return source != target;
126
      return predMatrixMap(source, target) == INVALID;
127 127
    }
128 128

	
129 129
    class RevArcIt {
130 130
    public:
131 131
      RevArcIt() {}
132 132
      RevArcIt(Invalid) : path(0), current(INVALID) {}
133 133
      RevArcIt(const PredMatrixMapPath& _path)
134 134
        : path(&_path), current(_path.target) {
135 135
        if (path->predMatrixMap(path->source, current) == INVALID)
136 136
          current = INVALID;
137 137
      }
138 138

	
0 comments (0 inline)