successive_shortest_path_nonnegative_weights_example.cpp 836 B

123456789101112131415161718192021222324252627282930
  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/successive_shortest_path_nonnegative_weights.hpp>
  10. #include <boost/graph/find_flow_cost.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::successive_shortest_path_nonnegative_weights(g, s, t);
  17. int cost = boost::find_flow_cost(g);
  18. assert(cost == 29);
  19. return 0;
  20. }