COIN-OR::LEMON - Graph Library

Changeset 501:20e4941a354a in lemon-0.x for src


Ignore:
Timestamp:
04/30/04 20:43:18 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@661
Message:

bipatite

Location:
src/work/marci
Files:
2 edited

Legend:

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

    r500 r501  
    3232    SFalseTTrueMap* s_false_t_true_map;
    3333
    34     BipartiteGraphWrapper() : GraphWrapper<Graph>() { }
     34    BipartiteGraphWrapper() : GraphWrapper<Graph>()/*,
     35                                                     S_CLASS(false), T_CLASS(true)*/ { }
    3536    void setSFalseTTrueMap(SFalseTTrueMap& _s_false_t_true_map) {
    3637      s_false_t_true_map=&_s_false_t_true_map;
     
    4041    //marci
    4142    //FIXME vhogy igy kellene, csak az en forditom nem eszi meg
    42     //static const bool S_CLASS=false;
    43     //static const bool T_CLASS=true;
     43    static const bool S_CLASS=false;
     44    static const bool T_CLASS=true;
    4445   
    45     bool S_CLASS;
    46     bool T_CLASS;
     46    //bool S_CLASS;
     47    //bool T_CLASS;
    4748
    4849    BipartiteGraphWrapper(Graph& _graph, SFalseTTrueMap& _s_false_t_true_map)
    4950      : GraphWrapper<Graph>(_graph),
    50         s_false_t_true_map(&_s_false_t_true_map),
    51         S_CLASS(false), T_CLASS(true) { }
     51        s_false_t_true_map(&_s_false_t_true_map)/*,
     52                                                  S_CLASS(false), T_CLASS(true)*/ { }
    5253    typedef typename GraphWrapper<Graph>::Node Node;
    5354    //using GraphWrapper<Graph>::NodeIt;
     
    210211      Node n=Parent::graph->addNode();
    211212      bipartite_map.update();
     213      //bipartite_map.set(n, -1);
    212214      s_false_t_true_map.insert(n, b);
    213215      return n;
  • src/work/marci/bipartite_matching_try_2.cc

    r500 r501  
    7777  std::cout << std::endl;
    7878
     79  std::cout << "Nodes:" << std::endl;
     80  FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
     81  std::cout << std::endl;
    7982  std::cout << "Nodes in T:" << std::endl;
    80   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, g.T_CLASS) std::cout << v << " ";
     83  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    8184  std::cout << std::endl;
    8285  std::cout << "Nodes in S:" << std::endl;
    83   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, g.S_CLASS) std::cout << v << " ";
     86  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    8487  std::cout << std::endl;
    8588
     
    9396
    9497  std::cout << "Nodes in T:" << std::endl;
    95   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, g.T_CLASS) std::cout << v << " ";
     98  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    9699  std::cout << std::endl;
    97100  std::cout << "Nodes in S:" << std::endl;
    98   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, g.S_CLASS) std::cout << v << " ";
     101  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    99102  std::cout << std::endl;
    100103
Note: See TracChangeset for help on using the changeset viewer.