COIN-OR::LEMON - Graph Library

Changes in / [1000:404b98971e1f:996:b6347aae6575] in lemon-main


Ignore:
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • lemon/adaptors.h

    r998 r877  
    13721372    /// and edge filter maps.
    13731373    SubGraph(GR& graph, NF& node_filter, EF& edge_filter) {
    1374       this->initialize(graph, node_filter, edge_filter);
     1374      initialize(graph, node_filter, edge_filter);
    13751375    }
    13761376
     
    22782278    /// Creates an undirected graph from the given digraph.
    22792279    Undirector(DGR& digraph) {
    2280       this->initialize(digraph);
     2280      initialize(digraph);
    22812281    }
    22822282
  • lemon/bits/bezier.h

    r997 r440  
    160160    const Point d=(a+b)/2;
    161161    const Point e=(b+c)/2;
    162     // const Point f=(d+e)/2;
     162    const Point f=(d+e)/2;
    163163    R f1=_f(Bezier3(p1,a,d,e),_d);
    164164    R f2=_f(Bezier3(e,d,c,p4),_d);
  • lemon/bits/edge_set_extender.h

    r1000 r966  
    524524    // Returns the base node of the iterator
    525525    Node baseNode(const IncEdgeIt &e) const {
    526       return e.direction ? this->u(e) : this->v(e);
     526      return e.direction ? u(e) : v(e);
    527527    }
    528528    // Running node of the iterator
     
    530530    // Returns the running node of the iterator
    531531    Node runningNode(const IncEdgeIt &e) const {
    532       return e.direction ? this->v(e) : this->u(e);
     532      return e.direction ? v(e) : u(e);
    533533    }
    534534
  • lemon/bits/graph_extender.h

    r998 r778  
    588588    // Returns the base node of the iterator
    589589    Node baseNode(const IncEdgeIt &edge) const {
    590       return edge._direction ? this->u(edge) : this->v(edge);
     590      return edge._direction ? u(edge) : v(edge);
    591591    }
    592592    // Running node of the iterator
     
    594594    // Returns the running node of the iterator
    595595    Node runningNode(const IncEdgeIt &edge) const {
    596       return edge._direction ? this->v(edge) : this->u(edge);
     596      return edge._direction ? v(edge) : u(edge);
    597597    }
    598598
  • lemon/circulation.h

    r998 r877  
    573573
    574574      Node act;
     575      Node bact=INVALID;
     576      Node last_activated=INVALID;
    575577      while((act=_level->highestActive())!=INVALID) {
    576578        int actlevel=(*_level)[act];
  • lemon/concept_check.h

    r997 r440  
    3636
    3737  template <class T> inline void ignore_unused_variable_warning(const T&) { }
    38   template <class T1, class T2>
    39   inline void ignore_unused_variable_warning(const T1&, const T2&) { }
    40   template <class T1, class T2, class T3>
    41   inline void ignore_unused_variable_warning(const T1&, const T2&,
    42                                              const T3&) { }
    43   template <class T1, class T2, class T3, class T4>
    44   inline void ignore_unused_variable_warning(const T1&, const T2&,
    45                                              const T3&, const T4&) { }
    46   template <class T1, class T2, class T3, class T4, class T5>
    47   inline void ignore_unused_variable_warning(const T1&, const T2&,
    48                                              const T3&, const T4&,
    49                                              const T5&) { }
    50   template <class T1, class T2, class T3, class T4, class T5, class T6>
    51   inline void ignore_unused_variable_warning(const T1&, const T2&,
    52                                              const T3&, const T4&,
    53                                              const T5&, const T6&) { }
    5438
    5539  ///\e
  • lemon/concepts/graph_components.h

    r1000 r976  
    495495          _GraphItemIt it3 = it1;
    496496          _GraphItemIt it4 = INVALID;
    497           ignore_unused_variable_warning(it3);
    498           ignore_unused_variable_warning(it4);
    499497
    500498          it2 = ++it1;
     
    586584          _GraphIncIt it3 = it1;
    587585          _GraphIncIt it4 = INVALID;
    588           ignore_unused_variable_warning(it3);
    589           ignore_unused_variable_warning(it4);
    590586
    591587          it2 = ++it1;
  • lemon/concepts/maps.h

    r997 r975  
    5050      /// Returns the value associated with the given key.
    5151      Value operator[](const Key &) const {
    52         return *(static_cast<Value *>(0)+1);
     52        return *static_cast<Value *>(0);
    5353      }
    5454
  • lemon/graph_to_eps.h

    r998 r964  
    223223  using T::_copyright;
    224224
    225   using typename T::NodeTextColorType;
     225  using T::NodeTextColorType;
    226226  using T::CUST_COL;
    227227  using T::DIST_COL;
  • lemon/planarity.h

    r999 r877  
    7373
    7474      void discover(const Arc& arc) {
     75        Node source = _graph.source(arc);
    7576        Node target = _graph.target(arc);
    7677
  • test/adaptors_test.cc

    r998 r995  
    6666  Digraph::Arc a2 = digraph.addArc(n1, n3);
    6767  Digraph::Arc a3 = digraph.addArc(n2, n3);
    68   ignore_unused_variable_warning(a3);
    6968
    7069  // Check the adaptor
     
    101100  Adaptor::Arc a7 = adaptor.addArc(n1, n4);
    102101  Adaptor::Arc a8 = adaptor.addArc(n1, n2);
    103   ignore_unused_variable_warning(a6,a7,a8);
    104102
    105103  adaptor.erase(a1);
     
    761759  Digraph::Arc a2 = digraph.addArc(n1, n3);
    762760  Digraph::Arc a3 = digraph.addArc(n2, n3);
    763   ignore_unused_variable_warning(a1,a2,a3);
    764761
    765762  checkGraphNodeList(adaptor, 6);
  • test/bellman_ford_test.cc

    r999 r880  
    191191
    192192  ListPath<Digraph> path;
    193   Value dist = 0;
     193  Value dist;
    194194  bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t);
    195195
  • test/connectivity_test.cc

    r998 r877  
    6969    Graph g(d);
    7070    Digraph::Node n = d.addNode();
    71     ignore_unused_variable_warning(n);
    7271
    7372    check(stronglyConnected(d), "This digraph is strongly connected");
     
    247246    Digraph::Node watch = d.addNode();
    248247    Digraph::Node pants = d.addNode();
    249     ignore_unused_variable_warning(watch);
    250248
    251249    d.addArc(socks, shoe);
  • test/digraph_test.cc

    r999 r877  
    6565      a3 = G.addArc(n2, n3),
    6666      a4 = G.addArc(n2, n3);
    67   ignore_unused_variable_warning(a2,a3,a4);
    6867
    6968  checkGraphNodeList(G, 3);
     
    9493  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
    9594      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
    96   ignore_unused_variable_warning(a1,a2,a3,a4);
    9795
    9896  Node n4 = G.split(n2);
     
    128126      a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3),
    129127      a5 = G.addArc(n2, n4);
    130   ignore_unused_variable_warning(a1,a2,a3,a5);
    131128
    132129  checkGraphNodeList(G, 4);
     
    208205      a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1),
    209206      a5 = G.addArc(n2, n4);
    210   ignore_unused_variable_warning(a2,a3,a4,a5);
    211207
    212208  // Check arc deletion
     
    256252  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
    257253      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
    258   ignore_unused_variable_warning(a1,a2,a3,a4);
    259254
    260255  typename Digraph::Snapshot snapshot(G);
     
    357352    e1 = g.addArc(n1, n2),
    358353    e2 = g.addArc(n2, n3);
    359   ignore_unused_variable_warning(e2);
    360354
    361355  check(g.valid(n1), "Wrong validity check");
     
    443437    a3 = g.addArc(n2, n3),
    444438    a4 = g.addArc(n2, n3);
    445   ignore_unused_variable_warning(a2,a3,a4);
    446439
    447440  digraphCopy(g, G).nodeRef(nref).run();
  • test/edge_set_test.cc

    r998 r877  
    4545
    4646  Digraph::Arc ga1 = digraph.addArc(n1, n2);
    47   ignore_unused_variable_warning(ga1);
    4847
    4948  ArcSet arc_set(digraph);
    5049
    5150  Digraph::Arc ga2 = digraph.addArc(n2, n1);
    52   ignore_unused_variable_warning(ga2);
    5351
    5452  checkGraphNodeList(arc_set, 2);
     
    7876    a3 = arc_set.addArc(n2, n3),
    7977    a4 = arc_set.addArc(n2, n3);
    80   ignore_unused_variable_warning(a2,a3,a4);
    81 
    8278  checkGraphNodeList(arc_set, 3);
    8379  checkGraphArcList(arc_set, 4);
     
    115111
    116112  Digraph::Arc ga1 = digraph.addArc(n1, n2);
    117   ignore_unused_variable_warning(ga1);
    118113
    119114  ArcSet arc_set(digraph);
    120115
    121116  Digraph::Arc ga2 = digraph.addArc(n2, n1);
    122   ignore_unused_variable_warning(ga2);
    123117
    124118  checkGraphNodeList(arc_set, 2);
     
    148142    a3 = arc_set.addArc(n2, n3),
    149143    a4 = arc_set.addArc(n2, n3);
    150   ignore_unused_variable_warning(a2,a3,a4);
    151 
    152144  checkGraphNodeList(arc_set, 3);
    153145  checkGraphArcList(arc_set, 4);
     
    199191
    200192  Digraph::Arc ga1 = digraph.addArc(n1, n2);
    201   ignore_unused_variable_warning(ga1);
    202193
    203194  EdgeSet edge_set(digraph);
    204195
    205196  Digraph::Arc ga2 = digraph.addArc(n2, n1);
    206   ignore_unused_variable_warning(ga2);
    207197
    208198  checkGraphNodeList(edge_set, 2);
     
    241231    e3 = edge_set.addEdge(n2, n3),
    242232    e4 = edge_set.addEdge(n2, n3);
    243   ignore_unused_variable_warning(e2,e3,e4);
    244 
    245233  checkGraphNodeList(edge_set, 3);
    246234  checkGraphEdgeList(edge_set, 4);
     
    287275
    288276  Digraph::Arc ga1 = digraph.addArc(n1, n2);
    289   ignore_unused_variable_warning(ga1);
    290277
    291278  EdgeSet edge_set(digraph);
    292279
    293280  Digraph::Arc ga2 = digraph.addArc(n2, n1);
    294   ignore_unused_variable_warning(ga2);
    295281
    296282  checkGraphNodeList(edge_set, 2);
     
    329315    e3 = edge_set.addEdge(n2, n3),
    330316    e4 = edge_set.addEdge(n2, n3);
    331   ignore_unused_variable_warning(e2,e3,e4);
    332 
    333317  checkGraphNodeList(edge_set, 3);
    334318  checkGraphEdgeList(edge_set, 4);
  • test/euler_test.cc

    r998 r877  
    102102    Graph g(d);
    103103    Digraph::Node n = d.addNode();
    104     ignore_unused_variable_warning(n);
    105  
     104
    106105    checkDiEulerIt(d);
    107106    checkDiEulerIt(g);
     
    191190    Digraph::Node n4 = d.addNode();
    192191    Digraph::Node n5 = d.addNode();
    193     ignore_unused_variable_warning(n0,n4,n5);
    194192
    195193    d.addArc(n1, n2);
  • test/fractional_matching_test.cc

    r999 r877  
    343343      pv += weight[mwfm.matching(n)];
    344344      SmartGraph::Node o = graph.target(mwfm.matching(n));
    345       ignore_unused_variable_warning(o);
    346345    } else {
    347346      check(mwfm.nodeValue(n) == 0, "Invalid matching");
     
    408407    pv += weight[mwpfm.matching(n)];
    409408    SmartGraph::Node o = graph.target(mwpfm.matching(n));
    410     ignore_unused_variable_warning(o);
    411409  }
    412410
  • test/graph_test.cc

    r998 r877  
    6767  Edge e2 = G.addEdge(n2, n1),
    6868       e3 = G.addEdge(n2, n3);
    69   ignore_unused_variable_warning(e2,e3);
    7069
    7170  checkGraphNodeList(G, 3);
     
    10099       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
    101100       e5 = G.addEdge(n4, n3);
    102   ignore_unused_variable_warning(e1,e3,e4,e5);
    103101
    104102  checkGraphNodeList(G, 4);
     
    180178       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
    181179       e5 = G.addEdge(n4, n3);
    182   ignore_unused_variable_warning(e1,e3,e4,e5);
    183180
    184181  // Check edge deletion
     
    221218  Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
    222219       e3 = G.addEdge(n2, n3);
    223   ignore_unused_variable_warning(e1,e2,e3);
    224220
    225221  checkGraphNodeList(G, 3);
     
    386382    e1 = g.addEdge(n1, n2),
    387383    e2 = g.addEdge(n2, n3);
    388   ignore_unused_variable_warning(e2);
    389384
    390385  check(g.valid(n1), "Wrong validity check");
     
    525520
    526521  Node n = G.nodeFromId(dim);
    527   ignore_unused_variable_warning(n);
    528522
    529523  for (NodeIt n(G); n != INVALID; ++n) {
  • test/maps_test.cc

    r998 r942  
    104104    NullMap<A,B> map1;
    105105    NullMap<A,B> map2 = map1;
    106     ignore_unused_variable_warning(map2);
    107106    map1 = nullMap<A,B>();
    108107  }
     
    115114    ConstMap<A,B> map2 = B();
    116115    ConstMap<A,B> map3 = map1;
    117     ignore_unused_variable_warning(map2,map3);
    118 
    119116    map1 = constMap<A>(B());
    120117    map1 = constMap<A,B>();
     
    122119    ConstMap<A,C> map4(C(1));
    123120    ConstMap<A,C> map5 = map4;
    124     ignore_unused_variable_warning(map5);
    125 
    126121    map4 = constMap<A>(C(2));
    127122    map4.setAll(C(3));
     
    144139    IdentityMap<A> map1;
    145140    IdentityMap<A> map2 = map1;
    146     ignore_unused_variable_warning(map2);
    147 
    148141    map1 = identityMap<A>();
    149142
     
    205198    checkConcept<ReadMap<B,double>, CompMap>();
    206199    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
    207     ignore_unused_variable_warning(map1);
    208200    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
    209     ignore_unused_variable_warning(map2);
    210201
    211202    SparseMap<double, bool> m1(false); m1[3.14] = true;
     
    220211    checkConcept<ReadMap<A,double>, CombMap>();
    221212    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
    222     ignore_unused_variable_warning(map1);
    223213    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
    224     ignore_unused_variable_warning(map2);
    225214
    226215    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
     
    234223    FunctorToMap<F> map1;
    235224    FunctorToMap<F> map2 = FunctorToMap<F>(F());
    236     ignore_unused_variable_warning(map2);
    237 
    238225    B b = functorToMap(F())[A()];
    239     ignore_unused_variable_warning(b);
    240226
    241227    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
    242228    MapToFunctor<ReadMap<A,B> > map =
    243229      MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
    244     ignore_unused_variable_warning(map);
    245230
    246231    check(functorToMap(&func)[A()] == 3,
     
    260245      ConvertMap<ReadMap<double, int>, double> >();
    261246    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
    262     ignore_unused_variable_warning(map1);
    263247    ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
    264     ignore_unused_variable_warning(map2);
    265 
    266248  }
    267249
  • test/time_measure_test.cc

    r997 r558  
    1818
    1919#include <lemon/time_measure.h>
    20 #include <lemon/concept_check.h>
    2120
    2221using namespace lemon;
     
    3433
    3534  for(int i=0;i<1000;i++)
    36     {
    37       TimeStamp x(T);
    38       ignore_unused_variable_warning(x);
    39     }
     35    TimeStamp x(T);
    4036}
    4137
Note: See TracChangeset for help on using the changeset viewer.