COIN-OR::LEMON - Graph Library

Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r705 r715  
    1919
    2020IF(MSVC)
    21   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     21  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
    2222# Suppressed warnings:
    2323# C4250: 'class1' : inherits 'class2::member' via dominance
    2424# C4355: 'this' : used in base member initializer list
     25# C4503: 'function' : decorated name length exceeded, name was truncated
    2526# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    2627# C4996: 'function': was declared deprecated
  • lemon/Makefile.am

    r708 r714  
    11EXTRA_DIST += \
    22        lemon/lemon.pc.in \
    3         lemon/CMakeLists.txt
     3        lemon/CMakeLists.txt \
     4        lemon/config.h.cmake
    45
    56pkgconfig_DATA += lemon/lemon.pc
     
    1718
    1819nodist_lemon_HEADERS = lemon/config.h   
    19        
     20
    2021lemon_libemon_la_CXXFLAGS = \
    2122        $(AM_CXXFLAGS) \
  • lemon/concepts/graph_components.h

    r664 r713  
    7272      GraphItem& operator=(const GraphItem&) { return *this; }
    7373
     74      /// \brief Assignment operator for INVALID.
     75      ///
     76      /// This operator makes the item invalid.
     77      GraphItem& operator=(Invalid) { return *this; }
     78
    7479      /// \brief Equality operator.
    7580      ///
     
    97102        void constraints() {
    98103          _GraphItem i1;
     104          i1=INVALID;
    99105          _GraphItem i2 = i1;
    100106          _GraphItem i3 = INVALID;
     
    222228        /// be convertible to the represented edge.
    223229        Edge(const Arc&) {}
    224 
    225         /// \brief Assign an arc to an edge.
    226         ///
    227         /// This function assigns an arc to an edge.
    228         /// Besides the core graph item functionality each arc should
    229         /// be convertible to the represented edge.
    230         Edge& operator=(const Arc&) { return *this; }
    231       };
     230     };
    232231
    233232      /// \brief Return one end node of an edge.
     
    354353          checkConcept<Base, _Digraph >();
    355354          typename _Digraph::Node node;
     355          node=INVALID;
    356356          int nid = digraph.id(node);
    357357          nid = digraph.id(node);
    358358          node = digraph.nodeFromId(nid);
    359359          typename _Digraph::Arc arc;
     360          arc=INVALID;
    360361          int eid = digraph.id(arc);
    361362          eid = digraph.id(arc);
  • lemon/edge_set.h

    r707 r717  
    8585    ListArcSetBase() : first_arc(-1), first_free_arc(-1) {}
    8686
     87    Node addNode() {
     88      LEMON_ASSERT(false,
     89        "This graph structure does not support node insertion");
     90      return INVALID; // avoid warning
     91    }
     92
    8793    Arc addArc(const Node& u, const Node& v) {
    8894      int n;
     
    416422
    417423    ListEdgeSetBase() : first_arc(-1), first_free_arc(-1) {}
     424
     425    Node addNode() {
     426      LEMON_ASSERT(false,
     427        "This graph structure does not support node insertion");
     428      return INVALID; // avoid warning
     429    }
    418430
    419431    Edge addEdge(const Node& u, const Node& v) {
     
    817829    SmartArcSetBase() {}
    818830
     831    Node addNode() {
     832      LEMON_ASSERT(false,
     833        "This graph structure does not support node insertion");
     834      return INVALID; // avoid warning
     835    }
     836
    819837    Arc addArc(const Node& u, const Node& v) {
    820838      int n = arcs.size();
     
    11131131    SmartEdgeSetBase() {}
    11141132
     1133    Node addNode() {
     1134      LEMON_ASSERT(false,
     1135        "This graph structure does not support node insertion");
     1136      return INVALID; // avoid warning
     1137    }
     1138
    11151139    Edge addEdge(const Node& u, const Node& v) {
    11161140      int n = arcs.size();
  • test/min_cost_flow_test.cc

    r711 r716  
    9494    void constraints() {
    9595      checkConcept<concepts::Digraph, GR>();
    96 
    97       MCF mcf(g);
     96     
     97      const Constraints& me = *this;
     98
     99      MCF mcf(me.g);
    98100      const MCF& const_mcf = mcf;
    99101
    100102      b = mcf.reset()
    101              .lowerMap(lower)
    102              .upperMap(upper)
    103              .costMap(cost)
    104              .supplyMap(sup)
    105              .stSupply(n, n, k)
     103             .lowerMap(me.lower)
     104             .upperMap(me.upper)
     105             .costMap(me.cost)
     106             .supplyMap(me.sup)
     107             .stSupply(me.n, me.n, me.k)
    106108             .run();
    107109
    108110      c = const_mcf.totalCost();
    109111      x = const_mcf.template totalCost<double>();
    110       v = const_mcf.flow(a);
    111       c = const_mcf.potential(n);
     112      v = const_mcf.flow(me.a);
     113      c = const_mcf.potential(me.n);
    112114      const_mcf.flowMap(fm);
    113115      const_mcf.potentialMap(pm);
     
    121123    typedef concepts::WriteMap<Arc, Value> FlowMap;
    122124    typedef concepts::WriteMap<Node, Cost> PotMap;
    123 
    124     const GR &g;
    125     const VAM &lower;
    126     const VAM &upper;
    127     const CAM &cost;
    128     const NM &sup;
    129     const Node &n;
    130     const Arc &a;
    131     const Value &k;
     125 
     126    GR g;
     127    VAM lower;
     128    VAM upper;
     129    CAM cost;
     130    NM sup;
     131    Node n;
     132    Arc a;
     133    Value k;
     134
    132135    FlowMap fm;
    133136    PotMap pm;
Note: See TracChangeset for help on using the changeset viewer.