cycle_canceling_example.cpp 817 B

12345678910111213141516171819202122232425262728
  1. //=======================================================================
  2. // Copyright 2013 University of Warsaw.
  3. // Authors: Piotr Wygocki
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //=======================================================================
  9. #include <boost/graph/cycle_canceling.hpp>
  10. #include <boost/graph/edmonds_karp_max_flow.hpp>
  11. #include "../test/min_cost_max_flow_utils.hpp"
  12. int main() {
  13. boost::SampleGraph::vertex_descriptor s,t;
  14. boost::SampleGraph::Graph g;
  15. boost::SampleGraph::getSampleGraph(g, s, t);
  16. boost::edmonds_karp_max_flow(g, s, t);
  17. boost::cycle_canceling(g);
  18. int cost = boost::find_flow_cost(g);
  19. assert(cost == 29);
  20. return 0;
  21. }