]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/graph/example/cycle_canceling_example.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / graph / example / cycle_canceling_example.cpp
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
10 #include <boost/graph/cycle_canceling.hpp>
11 #include <boost/graph/edmonds_karp_max_flow.hpp>
12
13 #include "../test/min_cost_max_flow_utils.hpp"
14
15
16 int main() {
17 boost::SampleGraph::vertex_descriptor s,t;
18 boost::SampleGraph::Graph g;
19 boost::SampleGraph::getSampleGraph(g, s, t);
20
21 boost::edmonds_karp_max_flow(g, s, t);
22 boost::cycle_canceling(g);
23
24 int cost = boost::find_flow_cost(g);
25 assert(cost == 29);
26 return 0;
27 }
28