COIN-OR::LEMON - Graph Library

Changeset 2031:080d51024ac5 in lemon-0.x for lemon/list_graph.h


Ignore:
Timestamp:
04/03/06 11:45:23 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2670
Message:

Correcting the structure of the graph's and adaptor's map.
The template assign operators and map iterators can be used for adaptors also.

Some bugfix in the adaptors

New class SwapBpUGraphAdaptor which swaps the two nodeset of the graph.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r1999 r2031  
    6767
    6868      int id;
    69       Node(int pid) { id = pid;}
     69      explicit Node(int pid) { id = pid;}
    7070
    7171    public:
     
    8282
    8383      int id;
    84       Edge(int pid) { id = pid;}
     84      explicit Edge(int pid) { id = pid;}
    8585
    8686    public:
     
    111111    int maxEdgeId() const { return edges.size()-1; }
    112112
    113     Node source(Edge e) const { return edges[e.id].source; }
    114     Node target(Edge e) const { return edges[e.id].target; }
     113    Node source(Edge e) const { return Node(edges[e.id].source); }
     114    Node target(Edge e) const { return Node(edges[e.id].target); }
    115115
    116116
     
    677677      int id;
    678678
    679       Node(int _id) : id(_id) {}
     679      explicit Node(int _id) : id(_id) {}
    680680    public:
    681681      Node() {}
     
    691691      int id;
    692692
    693       Edge(int _id) { id = _id;}
     693      explicit Edge(int _id) { id = _id;}
    694694    public:
    695695      Edge() {}
Note: See TracChangeset for help on using the changeset viewer.