COIN-OR::LEMON - Graph Library

Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r715 r705  
    1919
    2020IF(MSVC)
    21   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
     21  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /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
    2625# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    2726# C4996: 'function': was declared deprecated
  • lemon/Makefile.am

    r714 r708  
    11EXTRA_DIST += \
    22        lemon/lemon.pc.in \
    3         lemon/CMakeLists.txt \
    4         lemon/config.h.cmake
     3        lemon/CMakeLists.txt
    54
    65pkgconfig_DATA += lemon/lemon.pc
     
    1817
    1918nodist_lemon_HEADERS = lemon/config.h   
    20 
     19       
    2120lemon_libemon_la_CXXFLAGS = \
    2221        $(AM_CXXFLAGS) \
  • lemon/concepts/graph_components.h

    r713 r664  
    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 
    7974      /// \brief Equality operator.
    8075      ///
     
    10297        void constraints() {
    10398          _GraphItem i1;
    104           i1=INVALID;
    10599          _GraphItem i2 = i1;
    106100          _GraphItem i3 = INVALID;
     
    228222        /// be convertible to the represented edge.
    229223        Edge(const Arc&) {}
    230      };
     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      };
    231232
    232233      /// \brief Return one end node of an edge.
     
    353354          checkConcept<Base, _Digraph >();
    354355          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;
    361360          int eid = digraph.id(arc);
    362361          eid = digraph.id(arc);
  • lemon/edge_set.h

    r717 r707  
    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 
    9387    Arc addArc(const Node& u, const Node& v) {
    9488      int n;
     
    422416
    423417    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     }
    430418
    431419    Edge addEdge(const Node& u, const Node& v) {
     
    829817    SmartArcSetBase() {}
    830818
    831     Node addNode() {
    832       LEMON_ASSERT(false,
    833         "This graph structure does not support node insertion");
    834       return INVALID; // avoid warning
    835     }
    836 
    837819    Arc addArc(const Node& u, const Node& v) {
    838820      int n = arcs.size();
     
    11311113    SmartEdgeSetBase() {}
    11321114
    1133     Node addNode() {
    1134       LEMON_ASSERT(false,
    1135         "This graph structure does not support node insertion");
    1136       return INVALID; // avoid warning
    1137     }
    1138 
    11391115    Edge addEdge(const Node& u, const Node& v) {
    11401116      int n = arcs.size();
  • test/min_cost_flow_test.cc

    r716 r711  
    9494    void constraints() {
    9595      checkConcept<concepts::Digraph, GR>();
    96      
    97       const Constraints& me = *this;
    98 
    99       MCF mcf(me.g);
     96
     97      MCF mcf(g);
    10098      const MCF& const_mcf = mcf;
    10199
    102100      b = mcf.reset()
    103              .lowerMap(me.lower)
    104              .upperMap(me.upper)
    105              .costMap(me.cost)
    106              .supplyMap(me.sup)
    107              .stSupply(me.n, me.n, me.k)
     101             .lowerMap(lower)
     102             .upperMap(upper)
     103             .costMap(cost)
     104             .supplyMap(sup)
     105             .stSupply(n, n, k)
    108106             .run();
    109107
    110108      c = const_mcf.totalCost();
    111109      x = const_mcf.template totalCost<double>();
    112       v = const_mcf.flow(me.a);
    113       c = const_mcf.potential(me.n);
     110      v = const_mcf.flow(a);
     111      c = const_mcf.potential(n);
    114112      const_mcf.flowMap(fm);
    115113      const_mcf.potentialMap(pm);
     
    123121    typedef concepts::WriteMap<Arc, Value> FlowMap;
    124122    typedef concepts::WriteMap<Node, Cost> PotMap;
    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 
     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;
    135132    FlowMap fm;
    136133    PotMap pm;
Note: See TracChangeset for help on using the changeset viewer.