#include #include #include int main() { typedef boost::adjacency_list> graph; typedef graph::edge_descriptor edge; typedef graph::vertex_descriptor vertex; // Build the graph. graph g; // Fill in the maps. std::map e2e; std::map e2c; std::map e2r; std::map e2w; // Set the source and destination. vertex s, t; boost::associative_property_map> rev(e2e); boost::associative_property_map> cap(e2c); boost::associative_property_map> res(e2r); boost::associative_property_map> wgt(e2w); boost::successive_shortest_path_nonnegative_weights(g, s, t, capacity_map(cap). residual_capacity_map(res). reverse_edge_map(rev). weight_map(wgt)); return 0; }