COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/ugraph_adaptor.h


Ignore:
Timestamp:
03/02/07 19:04:28 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
Message:

Hard Warning checking

  • based on the remark of the ZIB user
  • we do not use -Winline
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/ugraph_adaptor.h

    r2381 r2386  
    100100
    101101    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    102     Edge findEdge(const Node& source, const Node& target,
     102    Edge findEdge(const Node& u, const Node& v,
    103103                  const Edge& prev = INVALID) {
    104       return graph->findEdge(source, target, prev);
    105     }
    106     UEdge findUEdge(const Node& source, const Node& target,
     104      return graph->findEdge(u, v, prev);
     105    }
     106    UEdge findUEdge(const Node& u, const Node& v,
    107107                    const UEdge& prev = INVALID) {
    108       return graph->findUEdge(source, target, prev);
     108      return graph->findUEdge(u, v, prev);
    109109    }
    110110 
    111111    Node addNode() const { return graph->addNode(); }
    112     UEdge addEdge(const Node& source, const Node& target) const {
    113       return graph->addEdge(source, target);
     112    UEdge addEdge(const Node& u, const Node& v) const {
     113      return graph->addEdge(u, v);
    114114    }
    115115
     
    126126    int id(const UEdge& e) const { return graph->id(e); }
    127127
    128     Node fromNodeId(int id) const {
    129       return graph->fromNodeId(id);
    130     }
    131 
    132     Edge fromEdgeId(int id) const {
    133       return graph->fromEdgeId(id);
    134     }
    135 
    136     UEdge fromUEdgeId(int id) const {
    137       return graph->fromUEdgeId(id);
     128    Node fromNodeId(int ix) const {
     129      return graph->fromNodeId(ix);
     130    }
     131
     132    Edge fromEdgeId(int ix) const {
     133      return graph->fromEdgeId(ix);
     134    }
     135
     136    UEdge fromUEdgeId(int ix) const {
     137      return graph->fromUEdgeId(ix);
    138138    }
    139139
     
    396396
    397397    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    398     Edge findEdge(const Node& source, const Node& target,
     398    Edge findEdge(const Node& u, const Node& v,
    399399                  const Edge& prev = INVALID) {
    400       if (!(*node_filter_map)[source] || !(*node_filter_map)[target]) {
     400      if (!(*node_filter_map)[u] || !(*node_filter_map)[v]) {
    401401        return INVALID;
    402402      }
    403       Edge edge = Parent::findEdge(source, target, prev);
     403      Edge edge = Parent::findEdge(u, v, prev);
    404404      while (edge != INVALID && !(*uedge_filter_map)[edge]) {
    405         edge = Parent::findEdge(source, target, edge);
     405        edge = Parent::findEdge(u, v, edge);
    406406      }
    407407      return edge;
    408408    }
    409     UEdge findUEdge(const Node& source, const Node& target,
     409    UEdge findUEdge(const Node& u, const Node& v,
    410410                  const UEdge& prev = INVALID) {
    411       if (!(*node_filter_map)[source] || !(*node_filter_map)[target]) {
     411      if (!(*node_filter_map)[u] || !(*node_filter_map)[v]) {
    412412        return INVALID;
    413413      }
    414       UEdge uedge = Parent::findUEdge(source, target, prev);
     414      UEdge uedge = Parent::findUEdge(u, v, prev);
    415415      while (uedge != INVALID && !(*uedge_filter_map)[uedge]) {
    416         uedge = Parent::findUEdge(source, target, uedge);
     416        uedge = Parent::findUEdge(u, v, uedge);
    417417      }
    418418      return uedge;
     
    429429                             template NodeMap<_Value> > Parent;
    430430   
    431       NodeMap(const Graph& graph)
    432         : Parent(graph) {}
    433       NodeMap(const Graph& graph, const _Value& value)
    434         : Parent(graph, value) {}
     431      NodeMap(const Graph& g)
     432        : Parent(g) {}
     433      NodeMap(const Graph& g, const _Value& v)
     434        : Parent(g, v) {}
    435435   
    436436      NodeMap& operator=(const NodeMap& cmap) {
     
    455455                             template EdgeMap<_Value> > Parent;
    456456   
    457       EdgeMap(const Graph& graph)
    458         : Parent(graph) {}
    459       EdgeMap(const Graph& graph, const _Value& value)
    460         : Parent(graph, value) {}
     457      EdgeMap(const Graph& g)
     458        : Parent(g) {}
     459      EdgeMap(const Graph& g, const _Value& v)
     460        : Parent(g, v) {}
    461461   
    462462      EdgeMap& operator=(const EdgeMap& cmap) {
     
    481481                             template UEdgeMap<_Value> > Parent;
    482482   
    483       UEdgeMap(const Graph& graph)
    484         : Parent(graph) {}
    485       UEdgeMap(const Graph& graph, const _Value& value)
    486         : Parent(graph, value) {}
     483      UEdgeMap(const Graph& g)
     484        : Parent(g) {}
     485      UEdgeMap(const Graph& g, const _Value& v)
     486        : Parent(g, v) {}
    487487   
    488488      UEdgeMap& operator=(const UEdgeMap& cmap) {
     
    623623
    624624    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    625     Edge findEdge(const Node& source, const Node& target,
     625    Edge findEdge(const Node& u, const Node& v,
    626626                  const Edge& prev = INVALID) {
    627       Edge edge = Parent::findEdge(source, target, prev);
     627      Edge edge = Parent::findEdge(u, v, prev);
    628628      while (edge != INVALID && !(*uedge_filter_map)[edge]) {
    629         edge = Parent::findEdge(source, target, edge);
     629        edge = Parent::findEdge(u, v, edge);
    630630      }
    631631      return edge;
    632632    }
    633     UEdge findUEdge(const Node& source, const Node& target,
     633    UEdge findUEdge(const Node& u, const Node& v,
    634634                  const UEdge& prev = INVALID) {
    635       UEdge uedge = Parent::findUEdge(source, target, prev);
     635      UEdge uedge = Parent::findUEdge(u, v, prev);
    636636      while (uedge != INVALID && !(*uedge_filter_map)[uedge]) {
    637         uedge = Parent::findUEdge(source, target, uedge);
     637        uedge = Parent::findUEdge(u, v, uedge);
    638638      }
    639639      return uedge;
     
    650650                             template NodeMap<_Value> > Parent;
    651651   
    652       NodeMap(const Graph& graph)
    653         : Parent(graph) {}
    654       NodeMap(const Graph& graph, const _Value& value)
    655         : Parent(graph, value) {}
     652      NodeMap(const Graph& g)
     653        : Parent(g) {}
     654      NodeMap(const Graph& g, const _Value& v)
     655        : Parent(g, v) {}
    656656   
    657657      NodeMap& operator=(const NodeMap& cmap) {
     
    676676                             template EdgeMap<_Value> > Parent;
    677677   
    678       EdgeMap(const Graph& graph)
    679         : Parent(graph) {}
    680       EdgeMap(const Graph& graph, const _Value& value)
    681         : Parent(graph, value) {}
     678      EdgeMap(const Graph& g)
     679        : Parent(g) {}
     680      EdgeMap(const Graph& g, const _Value& v)
     681        : Parent(g, v) {}
    682682   
    683683      EdgeMap& operator=(const EdgeMap& cmap) {
     
    702702                             template UEdgeMap<_Value> > Parent;
    703703   
    704       UEdgeMap(const Graph& graph)
    705         : Parent(graph) {}
    706       UEdgeMap(const Graph& graph, const _Value& value)
    707         : Parent(graph, value) {}
     704      UEdgeMap(const Graph& g)
     705        : Parent(g) {}
     706      UEdgeMap(const Graph& g, const _Value& v)
     707        : Parent(g, v) {}
    708708   
    709709      UEdgeMap& operator=(const UEdgeMap& cmap) {
     
    944944
    945945    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    946     Edge findEdge(const Node& source, const Node& target,
     946    Edge findEdge(const Node& u, const Node& v,
    947947                  const Edge& prev = INVALID) {
    948948      Edge edge = prev;
    949949      bool d = edge == INVALID ? true : (*direction)[edge];
    950950      if (d) {
    951         edge = graph->findUEdge(source, target, edge);
     951        edge = graph->findUEdge(u, v, edge);
    952952        while (edge != INVALID && !(*direction)[edge]) {
    953           graph->findUEdge(source, target, edge);
     953          graph->findUEdge(u, v, edge);
    954954        }
    955955        if (edge != INVALID) return edge;
    956956      }
    957       graph->findUEdge(target, source, edge);
     957      graph->findUEdge(v, u, edge);
    958958      while (edge != INVALID && (*direction)[edge]) {
    959         graph->findUEdge(source, target, edge);
     959        graph->findUEdge(u, v, edge);
    960960      }
    961961      return edge;
     
    966966    }
    967967
    968     Edge addEdge(const Node& source, const Node& target) const {
    969       Edge edge = graph->addEdge(source, target);
    970       direction->set(edge, graph->source(edge) == source);
     968    Edge addEdge(const Node& u, const Node& v) const {
     969      Edge edge = graph->addEdge(u, v);
     970      direction->set(edge, graph->source(edge) == u);
    971971      return edge;
    972972    }
Note: See TracChangeset for help on using the changeset viewer.