COIN-OR::LEMON - Graph Library

Changeset 446:d369e885d196 in lemon-main


Ignore:
Timestamp:
12/12/08 22:00:03 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Fix the usage of tags in adaptors.h (#67)
There are separate tags for arcs and edges now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/adaptors.h

    r416 r446  
    7171    int nodeNum() const { return _digraph->nodeNum(); }
    7272
    73     typedef EdgeNumTagIndicator<Digraph> EdgeNumTag;
     73    typedef ArcNumTagIndicator<Digraph> ArcNumTag;
    7474    int arcNum() const { return _digraph->arcNum(); }
    7575
    76     typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     76    typedef FindArcTagIndicator<Digraph> FindArcTag;
    7777    Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) {
    7878      return _digraph->findArc(u, v, prev);
     
    199199    int nodeNum() const { return _graph->nodeNum(); }
    200200
     201    typedef ArcNumTagIndicator<Graph> ArcNumTag;
     202    int arcNum() const { return _graph->arcNum(); }
     203
    201204    typedef EdgeNumTagIndicator<Graph> EdgeNumTag;
    202     int arcNum() const { return _graph->arcNum(); }
    203205    int edgeNum() const { return _graph->edgeNum(); }
    204206
    205     typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     207    typedef FindArcTagIndicator<Graph> FindArcTag;
    206208    Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) {
    207209      return _graph->findArc(u, v, prev);
    208210    }
     211
     212    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    209213    Edge findEdge(const Node& u, const Node& v, const Edge& prev = INVALID) {
    210214      return _graph->findEdge(u, v, prev);
     
    331335    Arc addArc(const Node& u, const Node& v) { return Parent::addArc(v, u); }
    332336
    333     typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     337    typedef FindArcTagIndicator<Digraph> FindArcTag;
    334338    Arc findArc(const Node& u, const Node& v,
    335339                const Arc& prev = INVALID) {
     
    468472
    469473    typedef False NodeNumTag;
    470     typedef False EdgeNumTag;
    471 
    472     typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     474    typedef False ArcNumTag;
     475
     476    typedef FindArcTagIndicator<Digraph> FindArcTag;
    473477    Arc findArc(const Node& source, const Node& target,
    474478                const Arc& prev = INVALID) {
     
    611615
    612616    typedef False NodeNumTag;
    613     typedef False EdgeNumTag;
    614 
    615     typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     617    typedef False ArcNumTag;
     618
     619    typedef FindArcTagIndicator<Digraph> FindArcTag;
    616620    Arc findArc(const Node& source, const Node& target,
    617621                const Arc& prev = INVALID) {
     
    936940
    937941    typedef False NodeNumTag;
     942    typedef False ArcNumTag;
    938943    typedef False EdgeNumTag;
    939944
    940     typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     945    typedef FindArcTagIndicator<Graph> FindArcTag;
    941946    Arc findArc(const Node& u, const Node& v,
    942947                const Arc& prev = INVALID) {
     
    950955      return arc;
    951956    }
     957
     958    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    952959    Edge findEdge(const Node& u, const Node& v,
    953960                  const Edge& prev = INVALID) {
     
    11321139
    11331140    typedef False NodeNumTag;
     1141    typedef False ArcNumTag;
    11341142    typedef False EdgeNumTag;
    11351143
    1136     typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     1144    typedef FindArcTagIndicator<Graph> FindArcTag;
    11371145    Arc findArc(const Node& u, const Node& v,
    11381146                const Arc& prev = INVALID) {
     
    11431151      return arc;
    11441152    }
     1153
     1154    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    11451155    Edge findEdge(const Node& u, const Node& v,
    11461156                  const Edge& prev = INVALID) {
     
    18471857    typedef NodeNumTagIndicator<Digraph> NodeNumTag;
    18481858    int nodeNum() const { return 2 * _digraph->arcNum(); }
    1849     typedef EdgeNumTagIndicator<Digraph> EdgeNumTag;
     1859
     1860    typedef ArcNumTagIndicator<Digraph> ArcNumTag;
    18501861    int arcNum() const { return 2 * _digraph->arcNum(); }
     1862
     1863    typedef ArcNumTag EdgeNumTag;
    18511864    int edgeNum() const { return _digraph->arcNum(); }
    18521865
    1853     typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     1866    typedef FindArcTagIndicator<Digraph> FindArcTag;
    18541867    Arc findArc(Node s, Node t, Arc p = INVALID) const {
    18551868      if (p == INVALID) {
     
    18701883    }
    18711884
     1885    typedef FindArcTag FindEdgeTag;
    18721886    Edge findEdge(Node s, Node t, Edge p = INVALID) const {
    18731887      if (s != t) {
     
    22252239    int nodeNum() const { return _graph->nodeNum(); }
    22262240
    2227     typedef EdgeNumTagIndicator<Graph> EdgeNumTag;
     2241    typedef EdgeNumTagIndicator<Graph> ArcNumTag;
    22282242    int arcNum() const { return _graph->edgeNum(); }
    22292243
    2230     typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     2244    typedef FindEdgeTagIndicator<Graph> FindArcTag;
    22312245    Arc findArc(const Node& u, const Node& v,
    22322246                const Arc& prev = INVALID) {
     
    28852899
    28862900    typedef True NodeNumTag;
    2887 
    28882901    int nodeNum() const {
    28892902      return  2 * countNodes(*_digraph);
    28902903    }
    28912904
    2892     typedef True EdgeNumTag;
     2905    typedef True ArcNumTag;
    28932906    int arcNum() const {
    28942907      return countArcs(*_digraph) + countNodes(*_digraph);
    28952908    }
    28962909
    2897     typedef True FindEdgeTag;
     2910    typedef True FindArcTag;
    28982911    Arc findArc(const Node& u, const Node& v,
    28992912                const Arc& prev = INVALID) const {
Note: See TracChangeset for help on using the changeset viewer.