COIN-OR::LEMON - Graph Library

Changeset 607:9ad8d2122b50 in lemon-main for test


Ignore:
Timestamp:
04/03/09 13:46:16 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Separate types for flow and cost values in NetworkSimplex? (#234)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/min_cost_flow_test.cc

    r606 r607  
    7878
    7979// Check the interface of an MCF algorithm
    80 template <typename GR, typename Value>
     80template <typename GR, typename Flow, typename Cost>
    8181class McfClassConcept
    8282{
     
    117117    typedef typename GR::Node Node;
    118118    typedef typename GR::Arc Arc;
    119     typedef concepts::ReadMap<Node, Value> NM;
    120     typedef concepts::ReadMap<Arc, Value> AM;
     119    typedef concepts::ReadMap<Node, Flow> NM;
     120    typedef concepts::ReadMap<Arc, Flow> FAM;
     121    typedef concepts::ReadMap<Arc, Cost> CAM;
    121122
    122123    const GR &g;
    123     const AM &lower;
    124     const AM &upper;
    125     const AM &cost;
     124    const FAM &lower;
     125    const FAM &upper;
     126    const CAM &cost;
    126127    const NM &sup;
    127128    const Node &n;
    128129    const Arc &a;
    129     const Value &k;
    130     Value v;
     130    const Flow &k;
     131    Flow v;
    131132    bool b;
    132133
     
    207208  // Check the interfaces
    208209  {
    209     typedef int Value;
     210    typedef int Flow;
     211    typedef int Cost;
    210212    // TODO: This typedef should be enabled if the standard maps are
    211213    // reference maps in the graph concepts (See #190).
     
    214216    typedef ListDigraph GR;
    215217/**/
    216     checkConcept< McfClassConcept<GR, Value>,
    217                   NetworkSimplex<GR, Value> >();
     218    checkConcept< McfClassConcept<GR, Flow, Cost>,
     219                  NetworkSimplex<GR, Flow, Cost> >();
    218220  }
    219221
Note: See TracChangeset for help on using the changeset viewer.