COIN-OR::LEMON - Graph Library

Changeset 87:46705346edd4 in lemon-0.x for src/work/marci


Ignore:
Timestamp:
02/17/04 12:24:21 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@114
Message:

mostmar pontosabb erteket ad

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/preflow_demo_jacint.cc

    r82 r87  
    55#include <dimacs.hh>
    66#include <preflow_push_max_flow.h>
     7#include <preflow_push_hl.h>
    78#include <time_measure.h>
    89
     
    2021  readDimacsMaxFlow(std::cin, G, s, t, cap);
    2122
    22   std::cout << "preflow demo (JACINT)..." << std::endl;
     23  {
     24  std::cout << "preflow demo (preflow_push_max_flow by JACINT)..." << std::endl;
    2325  //ListGraph::EdgeMap<int> flow(G); //0 flow
    2426
     
    4042  std::cout << "flow value: "<< max_flow_test.maxflow() << std::endl;
    4143  std::cout << "cut value: "<< cut_value << std::endl;
     44  }
     45
     46/*
     47    {
     48  std::cout << "preflow demo (preflow_push_hl by JACINT)..." << std::endl;
     49  //ListGraph::EdgeMap<int> flow(G); //0 flow
     50
     51  double pre_time=currTime();
     52  preflow_push_hl<ListGraph, int> max_flow_test(G, s, t, cap);
     53  max_flow_test.run();
     54  ListGraph::NodeMap<bool> cut=max_flow_test.mincut();
     55  int cut_value=0;
     56  for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
     57    if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
     58  }
     59  double post_time=currTime();
     60  //std::cout << "maximum flow: "<< std::endl;
     61  //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
     62  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
     63  //}
     64  //std::cout<<std::endl;
     65  std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
     66  std::cout << "flow value: "<< max_flow_test.maxflow() << std::endl;
     67  std::cout << "cut value: "<< cut_value << std::endl;
     68  }
     69*/
    4270
    4371  return 0;
Note: See TracChangeset for help on using the changeset viewer.