COIN-OR::LEMON - Graph Library

Changeset 446:77ef5c7a57d9 in lemon-0.x


Ignore:
Timestamp:
04/27/04 16:10:19 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@594
Message:

comparison for matchings with leda

Location:
src/work/marci/leda
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/leda/bipartite_matching_leda.cc

    r419 r446  
    88#include <LEDA/mcb_matching.h>
    99#include <LEDA/list.h>
     10#include <LEDA/graph_gen.h>
    1011
    1112#include <leda_graph_wrapper.h>
     
    9091  for (int i=0; i<b; ++i) bipartite_map.insert(t_nodes[i], true);
    9192
    92 //   Graph::Node u;
    93 //   std::cout << "These nodes will be in S:\n";
    94 //   //FIXME azert kellene ++, es invalid vizsgalat u-bol, hogy ezt le lehessen
    95 //   //irni 1etlen FOR_EACH-csel.
    96 //   for (bipartite_map.first(u, false); g.valid(u); bipartite_map.next(u))
    97 //     std::cout << u << " ";
    98 //   std::cout << "\n";
    99 //   std::cout << "These nodes will be in T:\n";
    100 //   for (bipartite_map.first(u, true); g.valid(u); bipartite_map.next(u))
    101 //     std::cout << u << " ";
    102 //   std::cout << "\n";
    103 
    10493  typedef BipartiteGraphWrapper<Graph> BGW;
    10594  BGW bgw(g, bipartite_map);
    106 
    107 //   std::cout << "Nodes by NodeIt:\n";
    108 //   FOR_EACH_LOC(BGW::NodeIt, n, bgw) {
    109 //     std::cout << n << " ";
    110 //   }
    111 //   std::cout << "\n";
    112 //   std::cout << "Nodes in S by ClassNodeIt:\n";
    113 //   FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, bgw.S_CLASS) {
    114 //     std::cout << n << " ";
    115 //   }
    116 //   std::cout << "\n";
    117 //   std::cout << "Nodes in T by ClassNodeIt:\n";
    118 //   FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, bgw.T_CLASS) {
    119 //     std::cout << n << " ";
    120 //   }
    121 //   std::cout << "\n";
    122 //   std::cout << "Edges of the bipartite graph:\n";
    123 //   FOR_EACH_LOC(BGW::EdgeIt, e, bgw) {
    124 //     std::cout << bgw.tail(e) << "->" << bgw.head(e) << std::endl;
    125 //   }
    12695
    12796  BGW::NodeMap<int> dbyj(bgw);
     
    131100  stGW stgw(bgw);
    132101  ConstMap<stGW::Edge, int> const1map(1);
    133 //  stGW::NodeMap<int> ize(stgw);
    134 
    135 //   BfsIterator< BGW, BGW::NodeMap<bool> > bfs(bgw);
    136 //   Graph::NodeIt si;
    137 //   Graph::Node s;
    138 //   s=g.first(si);
    139 //   bfs.pushAndSetReached(BGW::Node(s));
    140 //   while (!bfs.finished()) { ++bfs; }
    141 
    142 //   FOR_EACH_LOC(stGW::NodeIt, n, stgw) {
    143 //     std::cout << "out-edges of " << n << ":\n";
    144 //     FOR_EACH_INC_LOC(stGW::OutEdgeIt, e, stgw, n) {
    145 //       std::cout << " " << e << "\n";
    146 //       std::cout << " aNode: " << stgw.aNode(e) << "\n";
    147 //       std::cout << " bNode: " << stgw.bNode(e) << "\n";     
    148 //     }
    149 //     std::cout << "in-edges of " << n << ":\n";
    150 //     FOR_EACH_INC_LOC(stGW::InEdgeIt, e, stgw, n) {
    151 //       std::cout << " " << e << "\n";
    152 //       std::cout << " aNode: " << stgw.aNode(e) << "\n";
    153 //       std::cout << " bNode: " << stgw.bNode(e) << "\n";     
    154 //     }
    155 //   }
    156 //   std::cout << "Edges of the stGraphWrapper:\n";
    157 //   FOR_EACH_LOC(stGW::EdgeIt, n, stgw) {
    158 //     std::cout << " " << n << "\n";
    159 //   }
    160 
    161 //   stGW::NodeMap<bool> b(stgw);
    162 //   FOR_EACH_LOC(stGW::NodeIt, n, stgw) {
    163 //     std::cout << n << ": " << b[n] <<"\n";
    164 //   }
    165 
    166 //   std::cout << "Bfs from s: \n";
    167 //   BfsIterator< stGW, stGW::NodeMap<bool> > bfs_stgw(stgw);
    168 //   bfs_stgw.pushAndSetReached(stgw.S_NODE);
    169 //   while (!bfs_stgw.finished()) {
    170 //     std::cout << " " << stGW::OutEdgeIt(bfs_stgw) << "\n";
    171 //     ++bfs_stgw;
    172 //   }
    173 
    174102
    175103  Timer ts;
  • src/work/marci/leda/leda_graph_wrapper.h

    r419 r446  
    6464      template <typename T> friend class NodeMap;
    6565      leda_node _n;
     66    public: //FIXME
    6667      Node(leda_node __n) : _n(__n) { }
    6768    public:
     
    9697      template <typename T> friend class EdgeMap;
    9798      leda_edge _e;
     99    public: //FIXME
    98100      Edge(leda_edge __e) : _e(__e) { }
    99101    public:
  • src/work/marci/leda/makefile

    r433 r446  
    55LDFLAGS = -L$(LEDAROOT) -lG -lL -lm
    66
    7 BINARIES = bipartite_matching_leda
     7BINARIES = bipartite_matching_leda bipartite_matching_leda_gen
    88
    99include ../../makefile
Note: See TracChangeset for help on using the changeset viewer.