COIN-OR::LEMON - Graph Library

Changes in / [201:9757e3d9bfeb:202:a5ee729dc1e1] in lemon-1.2


Ignore:
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_utils.h

    r169 r199  
    603603        for (typename From::ArcIt it(from); it != INVALID; ++it) {
    604604          arcRefMap[it] = to.addArc(nodeRefMap[from.source(it)],
    605                                           nodeRefMap[from.target(it)]);
     605                                    nodeRefMap[from.target(it)]);
    606606        }
    607607      }
     
    629629        }
    630630        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)]);
    633633        }
    634634      }
     
    926926
    927927      Value operator[](const Key& key) const {
    928         bool forward =
    929           (_from.direction(key) ==
    930            (_node_ref[_from.source(key)] == _to.source(_edge_ref[key])));
     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);
    931932        return _to.direct(_edge_ref[key], forward);
    932933      }
  • test/CMakeLists.txt

    r171 r200  
    1111  dim_test
    1212  error_test
     13  graph_copy_test
    1314  graph_test
    1415  graph_utils_test
  • test/Makefile.am

    r171 r200  
    1616        test/dim_test \
    1717        test/error_test \
     18        test/graph_copy_test \
    1819        test/graph_test \
    1920        test/graph_utils_test \
     
    3738test_dim_test_SOURCES = test/dim_test.cc
    3839test_error_test_SOURCES = test/error_test.cc
     40test_graph_copy_test_SOURCES = test/graph_copy_test.cc
    3941test_graph_test_SOURCES = test/graph_test.cc
    4042test_graph_utils_test_SOURCES = test/graph_utils_test.cc
Note: See TracChangeset for help on using the changeset viewer.