# HG changeset patch
# User Balazs Dezso <deba@inf.elte.hu>
# Date 1216833680 -7200
# Node ID e39056157d24b92148602b884de400f1ce6579c1
# Parent 9ce7a01a95c7e5faa01c80e6697dad0e2d863291
Two bug fixes in DynArcLookUp
diff -r 9ce7a01a95c7 -r e39056157d24 lemon/core.h
a
|
b
|
|
1384 | 1384 | } else { |
1385 | 1385 | _right.set(e, _right[arc]); |
1386 | 1386 | _parent.set(_right[arc], e); |
| 1387 | _parent.set(e, _parent[arc]); |
1387 | 1388 | |
1388 | 1389 | if (_parent[arc] != INVALID) { |
1389 | 1390 | if (_left[_parent[arc]] == arc) { |
… |
… |
|
1514 | 1515 | Arc operator()(Node s, Node t) const |
1515 | 1516 | { |
1516 | 1517 | Arc a = _head[s]; |
| 1518 | if (a == INVALID) return INVALID; |
1517 | 1519 | while (true) { |
1518 | 1520 | if (_g.target(a) == t) { |
1519 | 1521 | const_cast<DynArcLookUp&>(*this).splay(a); |
… |
… |
|
1548 | 1550 | Arc findFirst(Node s, Node t) const |
1549 | 1551 | { |
1550 | 1552 | Arc a = _head[s]; |
| 1553 | if (a == INVALID) return INVALID; |
1551 | 1554 | Arc r = INVALID; |
1552 | 1555 | while (true) { |
1553 | 1556 | if (_g.target(a) < t) { |