| ... | ... |
@@ -111,25 +111,25 @@ |
| 111 | 111 |
int length() const {
|
| 112 | 112 |
int len = 0; |
| 113 | 113 |
typename Digraph::Node node = target; |
| 114 | 114 |
typename Digraph::Arc arc; |
| 115 | 115 |
while ((arc = predMatrixMap(source, node)) != INVALID) {
|
| 116 | 116 |
node = digraph.source(arc); |
| 117 | 117 |
++len; |
| 118 | 118 |
} |
| 119 | 119 |
return len; |
| 120 | 120 |
} |
| 121 | 121 |
|
| 122 | 122 |
bool empty() const {
|
| 123 |
return source |
|
| 123 |
return predMatrixMap(source, target) == INVALID; |
|
| 124 | 124 |
} |
| 125 | 125 |
|
| 126 | 126 |
class RevArcIt {
|
| 127 | 127 |
public: |
| 128 | 128 |
RevArcIt() {}
|
| 129 | 129 |
RevArcIt(Invalid) : path(0), current(INVALID) {}
|
| 130 | 130 |
RevArcIt(const PredMatrixMapPath& _path) |
| 131 | 131 |
: path(&_path), current(_path.target) {
|
| 132 | 132 |
if (path->predMatrixMap(path->source, current) == INVALID) |
| 133 | 133 |
current = INVALID; |
| 134 | 134 |
} |
| 135 | 135 |
|
0 comments (0 inline)