COIN-OR::LEMON - Graph Library

Changeset 768:a5e9303a5511 in lemon-0.x


Ignore:
Timestamp:
08/23/04 13:06:00 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1031
Message:

stGraphWrapper modifications

Location:
src/work/marci
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/bipartite_graph_wrapper.h

    r762 r768  
    3131  template<typename Graph>
    3232  class BipartiteGraphWrapper : public GraphWrapper<Graph> {
    33   protected:
     33  public:
    3434    typedef IterableBoolMap< typename Graph::template NodeMap<int> >
    3535    SFalseTTrueMap;
     36  protected:
    3637    SFalseTTrueMap* s_false_t_true_map;
    3738
     
    4748    static const bool S_CLASS;
    4849    static const bool T_CLASS;
     50
     51    /// This method is to reach the iterable maps of the bipartite graph or
     52    /// bipartite graph wrapper.
     53    const SFalseTTrueMap& sFalseTTrueMap() const {
     54      return *s_false_t_true_map;
     55    }
    4956   
    5057    //bool S_CLASS;
     
    212219  template<typename Graph>
    213220  class BipartiteGraph : public BipartiteGraphWrapper<Graph> {
    214     typedef IterableBoolMap< typename Graph::template NodeMap<int> >
    215     SFalseTTrueMap;
     221//     typedef IterableBoolMap< typename Graph::template NodeMap<int> >
     222//     SFalseTTrueMap;
    216223    typedef BipartiteGraphWrapper<Graph> Parent;
    217224  protected:
    218225    Graph gr;
    219226    typename Graph::template NodeMap<int> bipartite_map;
    220     SFalseTTrueMap s_false_t_true_map;
     227    typename Parent::SFalseTTrueMap s_false_t_true_map;
    221228  public:
    222229    typedef typename Parent::Node Node;
     
    259266  };
    260267
    261 
     268  template<typename Graph, typename sIterableMap, typename tIterableMap>
     269  class stGraphWrapper;
     270
     271  /// Easier stuff for bipartite graphs.
    262272  template<typename Graph>
    263   class stGraphWrapper;
     273  class stBipartiteGraphWrapper : public
     274  stGraphWrapper<Graph, typename Graph::SFalseTTrueMap,
     275                 typename Graph::SFalseTTrueMap> {
     276  public:
     277    typedef stGraphWrapper<Graph, typename Graph::SFalseTTrueMap,
     278                           typename Graph::SFalseTTrueMap> Parent;
     279    stBipartiteGraphWrapper(Graph& _graph) :
     280      Parent(_graph, _graph.sFalseTTrueMap(), _graph.sFalseTTrueMap()) { }
     281  };
    264282
    265283//   template<typename Graph>
     
    288306  ///
    289307  /// \author Marton Makai
    290   template<typename Graph>
     308  template<typename Graph, typename sIterableMap, typename tIterableMap>
    291309  class stGraphWrapper : public GraphWrapper<Graph> {
     310  protected:   
     311    const sIterableMap* s_iterable_map;
     312    const tIterableMap* t_iterable_map;
    292313  public:
    293314    class Node;
    294315    friend class Node;
    295316//GN, int
    296 //0 normalis, 1 s, 2, true, ez az iteralasi sorrend,
     317//0 normalis, 1 s, 2 t, ez az iteralasi sorrend,
    297318//es a vege a false azaz (invalid, 3)   
    298319    class NodeIt;
     
    335356    static const bool T_CLASS=true;
    336357
    337     stGraphWrapper(Graph& _graph) : GraphWrapper<Graph>(_graph) ,
    338                                     S_NODE(INVALID, 1),
    339                                     T_NODE(INVALID, 2) { }
     358    // \bug not too nice constructor.
     359    stGraphWrapper(Graph& _graph,
     360                   const sIterableMap& _s_iterable_map,
     361                   const tIterableMap& _t_iterable_map) :
     362      GraphWrapper<Graph>(_graph),
     363      s_iterable_map(&_s_iterable_map),
     364      t_iterable_map(&_t_iterable_map),
     365      S_NODE(INVALID, 1),
     366      T_NODE(INVALID, 2) { }
    340367
    341368   
     
    350377    protected:
    351378      friend class GraphWrapper<Graph>;
    352       friend class stGraphWrapper<Graph>;
     379      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    353380      template <typename T> friend class NodeMap;
    354381      friend class Edge;
     
    381408    class NodeIt {
    382409      friend class GraphWrapper<Graph>;
    383       friend class stGraphWrapper<Graph>;
     410      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    384411      typename Graph::NodeIt n;
    385412      int spec;
     
    389416        n(_n), spec(_spec) { }
    390417      NodeIt(const Invalid& i) : n(i), spec(3) { }
    391       NodeIt(const stGraphWrapper<Graph>& _G) : n(*(_G.graph)), spec(0) {
     418      NodeIt(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G)
     419        : n(*(_G.graph)), spec(0) {
    392420        if (!_G.graph->valid(n)) spec=1;
    393421      }
     
    397425    class Edge : public Graph::Edge {
    398426      friend class GraphWrapper<Graph>;
    399       friend class stGraphWrapper<Graph>;
     427      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    400428      template <typename T> friend class EdgeMap;
    401429      int spec;
     
    430458    class OutEdgeIt {
    431459      friend class GraphWrapper<Graph>;
    432       friend class stGraphWrapper<Graph>;
     460      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    433461      typename Graph::OutEdgeIt e;
    434462      int spec;
     
    441469      }
    442470      OutEdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    443       OutEdgeIt(const stGraphWrapper<Graph>& _G, const Node& _n) {
     471      OutEdgeIt(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G,
     472                const Node& _n) {
    444473        switch (_n.spec) {
    445474          case 0 :
     
    474503    class InEdgeIt {
    475504      friend class GraphWrapper<Graph>;
    476       friend class stGraphWrapper<Graph>;
     505      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    477506      typename Graph::InEdgeIt e;
    478507      int spec;
     
    485514      }
    486515      InEdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    487       InEdgeIt(const stGraphWrapper<Graph>& _G, const Node& _n) {
     516      InEdgeIt(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G,
     517               const Node& _n) {
    488518        switch (_n.spec) {
    489519          case 0 :
     
    518548    class EdgeIt {
    519549      friend class GraphWrapper<Graph>;
    520       friend class stGraphWrapper<Graph>;
     550      friend class stGraphWrapper<Graph, sIterableMap, tIterableMap>;
    521551      typename Graph::EdgeIt e;
    522552      int spec;
     
    528558        e(_e), spec(_spec), n(_n) { }
    529559      EdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    530       EdgeIt(const stGraphWrapper<Graph>& _G) :
     560      EdgeIt(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G) :
    531561        e(*(_G.graph)), spec(0), n(INVALID) {
    532562        if (!_G.graph->valid(e)) {
     
    719749      T s_value, t_value;
    720750    public:
    721       NodeMap(const stGraphWrapper<Graph>& _G) :  Parent(_G),
    722                                                   s_value(),
    723                                                   t_value() { }
    724       NodeMap(const stGraphWrapper<Graph>& _G, T a) : Parent(_G, a),
    725                                                       s_value(a),
    726                                                       t_value(a) { }
     751      NodeMap(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G) :
     752        Parent(_G),
     753        s_value(),
     754        t_value() { }
     755      NodeMap(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G, T a)
     756        : Parent(_G, a),
     757          s_value(a),
     758          t_value(a) { }
    727759      T operator[](const Node& n) const {
    728760        switch (n.spec) {
     
    754786    /// This class is to wrap a node-map of \c Graph and two variables
    755787    /// storing values for \c S_NODE and \c T_NODE to a node-map of
    756     /// stGraphWrapper<Graph>.
     788    /// stGraphWrapper<Graph, sIterableMap, tIterableMap>.
    757789    template<typename NM> class NodeMapWrapper {
    758790    public:
     
    798830      typename GraphWrapper<Graph>::template NodeMap<T> node_value;
    799831    public:
    800       EdgeMap(const stGraphWrapper<Graph>& _G) : Parent(_G),
    801                                                  node_value(_G) { }
    802       EdgeMap(const stGraphWrapper<Graph>& _G, T a) : Parent(_G, a),
    803                                                       node_value(_G, a) { }
     832      EdgeMap(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G)
     833        : Parent(_G),
     834          node_value(_G) { }
     835      EdgeMap(const stGraphWrapper<Graph, sIterableMap, tIterableMap>& _G, T a)
     836        : Parent(_G, a),
     837          node_value(_G, a) { }
    804838      T operator[](const Edge& e) const {
    805839        switch (e.spec) {
     
    830864
    831865    /// This class is to wrap an edge-map and a node-map of \c Graph
    832     /// to an edge-map of stGraphWrapper<Graph>.
     866    /// to an edge-map of stGraphWrapper<Graph, sIterableMap, tIterableMap>.
    833867    template<typename EM, typename NM>
    834868    class EdgeMapWrapper {
  • src/work/marci/bipartite_graph_wrapper_test.cc

    r762 r768  
    9090  BGW::EdgeMap<int> dbyxcj(bgw);
    9191
    92   typedef stGraphWrapper<BGW> stGW;
     92  typedef stBipartiteGraphWrapper<BGW> stGW;
    9393  stGW stgw(bgw);
    9494  ConstMap<stGW::Edge, int> const1map(1);
  • src/work/marci/bipartite_matching_try.cc

    r762 r768  
    117117//  BGW::EdgeMap<int> dbyxcj(bgw);
    118118
    119   typedef stGraphWrapper<BGW> stGW;
     119  typedef stBipartiteGraphWrapper<BGW> stGW;
    120120  stGW stgw(bgw);
    121121  ConstMap<stGW::Edge, int> const1map(1);
  • src/work/marci/bipartite_matching_try_3.cc

    r762 r768  
    1818using namespace hugo;
    1919
     20using std::cout;
     21using std::endl;
     22
    2023int main() {
    2124  //typedef UndirListGraph Graph;
     
    3134
    3235  int a;
    33   std::cout << "number of nodes in the first color class=";
     36  cout << "number of nodes in the first color class=";
    3437  std::cin >> a;
    3538  int b;
    36   std::cout << "number of nodes in the second color class=";
     39  cout << "number of nodes in the second color class=";
    3740  std::cin >> b;
    3841  int m;
    39   std::cout << "number of edges=";
     42  cout << "number of edges=";
    4043  std::cin >> m;
    4144 
    42   std::cout << "Generatig a random bipartite graph..." << std::endl;
     45  cout << "Generatig a random bipartite graph..." << endl;
    4346  random_init();
    4447  randomBipartiteGraph(g, a, b, m);
    4548
    46 //   std::cout << "Edges of the bipartite graph:" << std::endl;
    47 //   FOR_EACH_LOC(EdgeIt, e, g) std::cout << e << " ";
    48 //   std::cout << std::endl;
     49//   cout << "Edges of the bipartite graph:" << endl;
     50//   FOR_EACH_LOC(EdgeIt, e, g) cout << e << " ";
     51//   cout << endl;
    4952
    50 //   std::cout << "Nodes:" << std::endl;
    51 //   FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
    52 //   std::cout << std::endl;
    53 //   std::cout << "Nodes in T:" << std::endl;
    54 //   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    55 //   std::cout << std::endl;
    56 //   std::cout << "Nodes in S:" << std::endl;
    57 //   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    58 //   std::cout << std::endl;
     53//   cout << "Nodes:" << endl;
     54//   FOR_EACH_LOC(Graph::NodeIt, v, g) cout << v << " ";
     55//   cout << endl;
     56//   cout << "Nodes in T:" << endl;
     57//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) cout << v << " ";
     58//   cout << endl;
     59//   cout << "Nodes in S:" << endl;
     60//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) cout << v << " ";
     61//   cout << endl;
    5962
    60 //   std::cout << "Erasing the first node..." << std::endl;
     63//   cout << "Erasing the first node..." << endl;
    6164//   NodeIt n;
    6265//   g.first(n);
    6366//   g.erase(n);
    64 //   std::cout << "Nodes of the bipartite graph:" << std::endl;
    65 //   FOR_EACH_GLOB(n, g) std::cout << n << " ";
    66 //   std::cout << std::endl;
     67//   cout << "Nodes of the bipartite graph:" << endl;
     68//   FOR_EACH_GLOB(n, g) cout << n << " ";
     69//   cout << endl;
    6770
    68 //   std::cout << "Nodes in T:" << std::endl;
    69 //   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    70 //   std::cout << std::endl;
    71 //   std::cout << "Nodes in S:" << std::endl;
    72 //   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    73 //   std::cout << std::endl;
     71//   cout << "Nodes in T:" << endl;
     72//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) cout << v << " ";
     73//   cout << endl;
     74//   cout << "Nodes in S:" << endl;
     75//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) cout << v << " ";
     76//   cout << endl;
    7477
    75   typedef stGraphWrapper<Graph> stGW;
     78  typedef stBipartiteGraphWrapper<Graph> stGW;
    7679  stGW stgw(g);
    7780  ConstMap<stGW::Edge, int> const1map(1);
    7881
    7982  Timer ts;
     83  cout << "max bipartite matching with stGraphWrapper..." << endl;
    8084  ts.reset();
    8185  stGW::EdgeMap<int> flow(stgw);
     
    8791//  while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
    8892//  while (max_flow_test.augmentOnBlockingFlow2()) {
    89 //   std::cout << max_flow_test.flowValue() << std::endl;
     93//   cout << max_flow_test.flowValue() << endl;
    9094//  }
    91   std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl;
    92   std::cout << "elapsed time: " << ts << std::endl;
     95  cout << "matching value: " << max_flow_test.flowValue() << endl;
     96  cout << "elapsed time: " << ts << endl;
    9397//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
    94 //     if (flow[e]) std::cout << e << std::endl;
     98//     if (flow[e]) cout << e << endl;
    9599//   }
    96   std::cout << std::endl;
     100  cout << endl;
    97101
    98102  typedef ConstMap<Graph::Edge, int> EdgeCap;
     
    105109  NodeFlow gnf(g); //0
    106110
    107   typedef stGraphWrapper<Graph>::EdgeMapWrapper<EdgeCap, NodeCap> CapMap;
    108   typedef stGraphWrapper<Graph>::EdgeMapWrapper<EdgeFlow, NodeFlow> FlowMap;
     111  typedef stGW::EdgeMapWrapper<EdgeCap, NodeCap> CapMap;
     112  typedef stGW::EdgeMapWrapper<EdgeFlow, NodeFlow> FlowMap;
    109113  CapMap cm(ge1, gn1);
    110114  FlowMap fm(gef, gnf);
    111115
    112116  //Timer ts;
     117  cout << "max bipartite matching with stGraphWrapper..." << endl;
    113118  ts.reset();
    114119  //stGW::EdgeMap<int> flow(stgw);
     
    120125//  while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
    121126//  while (max_flow_test.augmentOnBlockingFlow2()) {
    122 //   std::cout << max_flow_test.flowValue() << std::endl;
     127//   cout << max_flow_test.flowValue() << endl;
    123128//  }
    124   std::cout << "max flow value: " << max_flow_test1.flowValue() << std::endl;
    125   std::cout << "elapsed time: " << ts << std::endl;
     129  cout << "matching value: " << max_flow_test1.flowValue() << endl;
     130  cout << "elapsed time: " << ts << endl;
    126131//   FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    127 //     if (gef[e]) std::cout << e << std::endl;
     132//     if (gef[e]) cout << e << endl;
    128133//   }
    129   std::cout << std::endl;
     134  cout << endl;
    130135
     136  cout << "max bipartite matching with stGraphWrapper..." << endl;
    131137  ts.reset();
    132138  FOR_EACH_LOC(Graph::EdgeIt, e, g) gef.set(e, 0);
     
    137143  matching_test.run();
    138144
    139   std::cout << "max flow value: " << matching_test.matchingValue() << std::endl;
    140   std::cout << "elapsed time: " << ts << std::endl;
     145  cout << "matching value: " << matching_test.matchingValue() << endl;
     146  cout << "elapsed time: " << ts << endl;
    141147//   FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    142 //     if (gef[e]) std::cout << e << std::endl;
     148//     if (gef[e]) cout << e << endl;
    143149//   }
    144   std::cout << std::endl;
     150  cout << endl;
    145151
     152  cout << "max bipartite matching with MaxBipartiteMatching..." << endl;
    146153  ts.reset();
    147154  FOR_EACH_LOC(Graph::EdgeIt, e, g) gef.set(e, 0);
    148155  //FOR_EACH_LOC(Graph::NodeIt, n, g) gnf.set(n, 0);
    149   MaxBipartiteMatching<Graph, ConstMap<Graph::Edge, int>, ConstMap<Graph::Node, int>,
    150     Graph::EdgeMap<int>, Graph::NodeMap<int> >
    151     matching_test_1(g, ge1, gn1, gef/*, gnf*/);
     156  typedef MaxBipartiteMatching<Graph, ConstMap<Graph::Edge, int>,
     157    ConstMap<Graph::Node, int>,
     158    Graph::EdgeMap<int>, Graph::NodeMap<int> > MaxBipartiteMatching;
     159  MaxBipartiteMatching matching_test_1(g, ge1, gn1, gef/*, gnf*/);
    152160  matching_test_1.run();
    153161
    154   std::cout << "max flow value: " << matching_test_1.matchingValue() << std::endl;
    155   std::cout << "elapsed time: " << ts << std::endl;
     162  cout << "matching value: " << matching_test_1.matchingValue() << endl;
     163  cout << "elapsed time: " << ts << endl;
    156164//   FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    157 //     if (gef[e]) std::cout << e << std::endl;
     165//     if (gef[e]) cout << e << endl;
    158166//   }
    159   std::cout << std::endl;
     167  cout << endl;
     168
     169  cout << "testing optimality with MaxBipartiteMatching..." << endl;
     170  ts.reset();
     171  matching_test_1.run(MaxBipartiteMatching::GEN_MATCHING);
     172  cout << "matching value: " << matching_test_1.matchingValue() << endl;
     173  cout << "elapsed time: " << ts << endl;
     174
     175  cout << "testing optimality with MaxBipartiteMatching..." << endl;
     176  ts.reset();
     177  matching_test_1.run(MaxBipartiteMatching::GEN_MATCHING_WITH_GOOD_NODE_FLOW);
     178  cout << "matching value: " << matching_test_1.matchingValue() << endl;
     179  cout << "elapsed time: " << ts << endl;
    160180
    161181  return 0;
  • src/work/marci/leda/bipartite_matching_leda_gen.cc

    r648 r768  
    9898
    9999  //st-wrapper
    100   typedef stGraphWrapper<BGW> stGW;
     100  typedef stBipartiteGraphWrapper<BGW> stGW;
    101101  stGW stgw(bgw);
    102102  ConstMap<stGW::Edge, int> const1map(1);
  • src/work/marci/leda/comparison.cc

    r648 r768  
    9898
    9999  //st-wrapper
    100   typedef stGraphWrapper<BGW> stGW;
     100  typedef stBipartiteGraphWrapper<BGW> stGW;
    101101  stGW stgw(bgw);
    102102  ConstMap<stGW::Edge, int> const1map(1);
  • src/work/marci/lp/lp_solver_wrapper.h

    r765 r768  
    332332    }
    333333    ///.
    334     void setObjCoef(const ColIt& col_it, double obj_coef) {
    335       lpx_set_obj_coef(lp, col_iter_map[col_it], obj_coef);
     334    double getObjCoef(const ColIt& col_it) {
     335      return lpx_get_obj_coef(lp, col_iter_map[col_it]);
    336336    }
    337337    ///.
  • src/work/marci/max_bipartite_matching.h

    r762 r768  
    6060    //   EdgeFlow* edge_flow;
    6161    //   NodeFlow* node_flow;
    62     typedef  stGraphWrapper<Graph> stGW;
     62    typedef  stBipartiteGraphWrapper<Graph> stGW;
    6363    stGW stgw;
    6464    typedef typename stGW::template EdgeMapWrapper<EdgeCap, NodeCap> CapMap;
     
    6767    typedef typename stGW::template EdgeMapWrapper<EdgeFlow, NodeFlow> FlowMap;
    6868    FlowMap flow;
    69     MaxFlow<stGW, int, CapMap, FlowMap> mf;
     69    typedef MaxFlow<stGW, int, CapMap, FlowMap> MaxFlow;
     70    MaxFlow mf;
    7071    //graph* g;
    7172    //EdgeCap* edge_cap;
    7273    //EdgeFlow* edge_flow;
    7374  public:
     75    enum MatchingEnum{
     76      ZERO_MATCHING,
     77      GEN_MATCHING,
     78      GEN_MATCHING_WITH_GOOD_NODE_FLOW,
     79      NO_MATCHING
     80    };
    7481    /// For capacitated b-matchings, edge-caoacities and node-capacities
    7582    /// have to be given. After running \c run the matching is is given
     
    99106    ~MaxBipartiteMatching() { if (node_flow) delete node_flow; }
    100107    /// run computes the max matching.
    101     void run() { mf.run(); }
     108    void run(MatchingEnum me=ZERO_MATCHING) {
     109      switch (me) {
     110        case ZERO_MATCHING:
     111          mf.run(MaxFlow::ZERO_FLOW);
     112          break;
     113        case GEN_MATCHING:
     114        {
     115          typename stGW::OutEdgeIt e;
     116          for (stgw.first(e, stgw.S_NODE); stgw.valid(e); stgw.next(e))
     117            flow.set(e, cap[e]);
     118        }
     119        {
     120          typename stGW::InEdgeIt e;
     121          for (stgw.first(e, stgw.T_NODE); stgw.valid(e); stgw.next(e))
     122            flow.set(e, 0);
     123        }
     124        mf.run(MaxFlow::PRE_FLOW);
     125        break;
     126        case GEN_MATCHING_WITH_GOOD_NODE_FLOW:
     127          mf.run(MaxFlow::GEN_FLOW);
     128          break;
     129        case NO_MATCHING:
     130          mf.run(MaxFlow::NO_FLOW);
     131          break;
     132      }
     133    }
    102134    /// The matching value after running \c run.
    103     int matchingValue() { return mf.flowValue(); }
     135    int matchingValue() const { return mf.flowValue(); }
    104136  };
    105137
  • src/work/marci/max_bipartite_matching_demo.cc

    r642 r768  
    7171  int m;
    7272  cout << "number of edges=";
    73   cin >> m;
    74  
     73  cin >> m;   
    7574
    7675  for(int i=0; i<a; ++i) {
Note: See TracChangeset for help on using the changeset viewer.