COIN-OR::LEMON - Graph Library

Changeset 465:d72e56f1730d in lemon-0.x


Ignore:
Timestamp:
04/29/04 11:08:14 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@616
Message:

mods implied by preflow mods

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/include/dimacs.h

    r442 r465  
    2121  /// If the data is a shortest path problem instance then \c s will be the
    2222  /// source node and \c capacity will contain the edge lengths.
     23  ///
     24  ///\author Marton Makai
    2325  template<typename Graph, typename CapacityMap>
    2426  void readDimacsMaxFlow(std::istream& is, Graph &g, typename Graph::Node &s, typename Graph::Node &t, CapacityMap& capacity) {
  • src/work/jacint/preflow.h

    r451 r465  
    6363    Node s;
    6464    Node t;
    65     CapMap* capacity; 
     65    const CapMap* capacity; 
    6666    FlowMap* flow;
    6767    int n;      //the number of nodes of G
     
    7878    };
    7979
    80     Preflow(Graph& _G, Node _s, Node _t, CapMap& _capacity,
     80    Preflow(const Graph& _G, Node _s, Node _t, const CapMap& _capacity,
    8181            FlowMap& _flow) :
    8282      G(_G), s(_s), t(_t), capacity(&_capacity),
     
    154154          break;
    155155        }
     156//       default:
     157//      break;
     158//      ZERO_FLOW ize kell
     159
    156160      }
    157161     
  • src/work/marci/bipartite_matching_try.cc

    r410 r465  
    182182  stGW::EdgeMap<int> pre_flow(stgw);
    183183  Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    184     pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true);
     184    pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/);
    185185  pre_flow_test.run();
    186186  std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl;
  • src/work/marci/edmonds_karp_demo.cc

    r418 r465  
    7272  Graph::EdgeMap<int> flow(G); //0 flow
    7373  Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    74     pre_flow_test(G, s, t, cap, flow, true);
     74    pre_flow_test(G, s, t, cap, flow/*, true*/);
    7575  Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    76     pre_flow_ize(G, s, t, cap, flow, false);
    77   PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    78     pre_flow_res(G, s, t, cap, flow, true);
     76    pre_flow_ize(G, s, t, cap, flow/*, false*/);
     77//   PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     78//     pre_flow_res(G, s, t, cap, flow/*, true*/);
    7979  MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    8080    max_flow_test(G, s, t, cap, flow);
     
    9292    FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
    9393    ts.reset();
    94     pre_flow_ize.run();
     94    pre_flow_ize.preflow(Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW);
    9595    std::cout << "elapsed time: " << ts << std::endl;
    9696    std::cout << "flow value: "<< pre_flow_ize.flowValue() << std::endl;
    9797  }
    9898
    99   {
    100     std::cout << "wrapped preflow ..." << std::endl;
    101     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
    102     ts.reset();
    103     pre_flow_res.run();
    104     std::cout << "elapsed time: " << ts << std::endl;
    105     std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
    106   }
     99//   {
     100//     std::cout << "wrapped preflow ..." << std::endl;
     101//     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     102//     ts.reset();
     103//     pre_flow_res.run();
     104//     std::cout << "elapsed time: " << ts << std::endl;
     105//     std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
     106//   }
    107107
    108108  {
  • src/work/marci/lg_vs_sg.cc

    r379 r465  
    3636    Graph::EdgeMap<int> flow(G); //0 flow
    3737    Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    38       pre_flow_test(G, s, t, cap, flow, true);
     38      pre_flow_test(G, s, t, cap, flow/*, true*/);
    3939    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    4040      max_flow_test(G, s, t, cap, flow);
     
    110110    Graph::EdgeMap<int> flow(G); //0 flow
    111111    Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    112       pre_flow_test(G, s, t, cap, flow, true);
     112      pre_flow_test(G, s, t, cap, flow/*, true*/);
    113113    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    114114      max_flow_test(G, s, t, cap, flow);
Note: See TracChangeset for help on using the changeset viewer.