#include // for std::cout #include #include using namespace boost; typedef adjacency_list_traits Traits; typedef property EdgeReverseProperty; typedef property EdgeResidualCapacityProperty; typedef property EdgeCapacityProperty; typedef property > > VertexProperty; typedef adjacency_list Graph; //simple int main(int,char*[]) { // declare a graph object Graph g(2); //a graph with 2 vertices //add an edge between node 0 and node 1 with weight (capacity) 2.3 put(edge_capacity, g, add_edge(0, 1, g).first, 2.3); //find min cut Traits::vertex_descriptor s, t; //double flow = kolmogorov_max_flow(g, s, t); // a list of sources will be returned in s, and a list of sinks will be returned in t double flow = kolmogorov_max_flow(g, s, t); // a list of sources will be returned in s, and a list of sinks will be returned in t std::cout << "Max flow is: " << flow << std::endl; return 0; }