| ... | ... |
@@ -599,13 +599,13 @@ |
| 599 | 599 |
NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
|
| 600 | 600 |
for (typename From::NodeIt it(from); it != INVALID; ++it) {
|
| 601 | 601 |
nodeRefMap[it] = to.addNode(); |
| 602 | 602 |
} |
| 603 | 603 |
for (typename From::ArcIt it(from); it != INVALID; ++it) {
|
| 604 | 604 |
arcRefMap[it] = to.addArc(nodeRefMap[from.source(it)], |
| 605 |
|
|
| 605 |
nodeRefMap[from.target(it)]); |
|
| 606 | 606 |
} |
| 607 | 607 |
} |
| 608 | 608 |
}; |
| 609 | 609 |
|
| 610 | 610 |
template <typename Digraph> |
| 611 | 611 |
struct DigraphCopySelector< |
| ... | ... |
@@ -625,14 +625,14 @@ |
| 625 | 625 |
static void copy(Graph &to, const From& from, |
| 626 | 626 |
NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
|
| 627 | 627 |
for (typename From::NodeIt it(from); it != INVALID; ++it) {
|
| 628 | 628 |
nodeRefMap[it] = to.addNode(); |
| 629 | 629 |
} |
| 630 | 630 |
for (typename From::EdgeIt it(from); it != INVALID; ++it) {
|
| 631 |
edgeRefMap[it] = to.addArc(nodeRefMap[from.source(it)], |
|
| 632 |
nodeRefMap[from.target(it)]); |
|
| 631 |
edgeRefMap[it] = to.addEdge(nodeRefMap[from.u(it)], |
|
| 632 |
nodeRefMap[from.v(it)]); |
|
| 633 | 633 |
} |
| 634 | 634 |
} |
| 635 | 635 |
}; |
| 636 | 636 |
|
| 637 | 637 |
template <typename Graph> |
| 638 | 638 |
struct GraphCopySelector< |
| ... | ... |
@@ -922,15 +922,16 @@ |
| 922 | 922 |
_edge_ref(edge_ref), _node_ref(node_ref) {}
|
| 923 | 923 |
|
| 924 | 924 |
typedef typename From::Arc Key; |
| 925 | 925 |
typedef typename To::Arc Value; |
| 926 | 926 |
|
| 927 | 927 |
Value operator[](const Key& key) const {
|
| 928 |
bool forward = |
|
| 929 |
(_from.direction(key) == |
|
| 930 |
|
|
| 928 |
bool forward = _from.u(key) != _from.v(key) ? |
|
| 929 |
_node_ref[_from.source(key)] == |
|
| 930 |
_to.source(_to.direct(_edge_ref[key], true)) : |
|
| 931 |
_from.direction(key); |
|
| 931 | 932 |
return _to.direct(_edge_ref[key], forward); |
| 932 | 933 |
} |
| 933 | 934 |
|
| 934 | 935 |
const To& _to; |
| 935 | 936 |
const From& _from; |
| 936 | 937 |
const EdgeRefMap& _edge_ref; |
0 comments (0 inline)