COIN-OR::LEMON - Graph Library

Changeset 2290:f30867b359a8 in lemon-0.x for lemon/bits/graph_extender.h


Ignore:
Timestamp:
11/03/06 15:20:24 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3055
Message:

GraphCopy? and UGraphCopy modifications
Preliminary support for static graphs

=> cloning graphs

Added BpUGraphCopy

Tests for graph copies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r2283 r2290  
    283283    }
    284284
     285    template <typename Graph, typename NodeRefMap, typename EdgeRefMap>
     286    void clone(const Graph& graph, NodeRefMap& nodeRef, EdgeRefMap& edgeRef) {
     287      Parent::clone(graph, nodeRef, edgeRef);
     288      getNotifier(Node()).build();
     289      getNotifier(Edge()).build();
     290    }
    285291
    286292    void erase(const Node& node) {
     
    686692      getNotifier(Node()).clear();
    687693      Parent::clear();
     694    }
     695
     696    template <typename Graph, typename NodeRefMap, typename UEdgeRefMap>
     697    void clone(const Graph& graph, NodeRefMap& nodeRef,
     698               UEdgeRefMap& uEdgeRef) {
     699      Parent::clone(graph, nodeRef, uEdgeRef);
     700      getNotifier(Node()).build();
     701      getNotifier(UEdge()).build();
     702      getNotifier(Edge()).build();
    688703    }
    689704
     
    13021317    }
    13031318
     1319    template <typename Graph, typename ANodeRefMap,
     1320              typename BNodeRefMap, typename UEdgeRefMap>
     1321    void clone(const Graph& graph, ANodeRefMap& aNodeRef,
     1322               BNodeRefMap& bNodeRef, UEdgeRefMap& uEdgeRef) {
     1323      Parent::clone(graph, aNodeRef, bNodeRef, uEdgeRef);
     1324      getNotifier(ANode()).build();
     1325      getNotifier(BNode()).build();
     1326      getNotifier(Node()).build();
     1327      getNotifier(UEdge()).build();
     1328      getNotifier(Edge()).build();
     1329    }
     1330
    13041331    void erase(const Node& node) {
    13051332      UEdge uedge;
Note: See TracChangeset for help on using the changeset viewer.