Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85568 - in trunk: boost/graph libs/graph/doc libs/graph/example libs/graph/test
From: jewillco_at_[hidden]
Date: 2013-09-04 17:39:21


Author: jewillco
Date: 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013)
New Revision: 85568
URL: http://svn.boost.org/trac/boost/changeset/85568

Log:
Applied patch and file renames from Piotr Wygocki

Added:
   trunk/boost/graph/successive_shortest_path_nonnegative_weights.hpp
      - copied, changed from r85565, trunk/boost/graph/successive_shortest_path.hpp
   trunk/libs/graph/doc/successive_shortest_path_nonnegative_weights.html
      - copied, changed from r85565, trunk/libs/graph/doc/successive_shortest_path.html
   trunk/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp
      - copied, changed from r85565, trunk/libs/graph/example/successive_shortest_path_example.cpp
   trunk/libs/graph/test/successive_shortest_path_nonnegative_weights_test.cpp
      - copied, changed from r85565, trunk/libs/graph/test/successive_shortest_path_test.cpp
Deleted:
   trunk/boost/graph/successive_shortest_path.hpp
   trunk/libs/graph/doc/successive_shortest_path.html
   trunk/libs/graph/example/successive_shortest_path_example.cpp
   trunk/libs/graph/test/successive_shortest_path_test.cpp
Text files modified:
   trunk/boost/graph/cycle_canceling.hpp | 2
   /dev/null | 261 ---------------------------------------
   trunk/boost/graph/successive_shortest_path_nonnegative_weights.hpp | 34 ++--
   trunk/libs/graph/doc/cycle_canceling.html | 6
   trunk/libs/graph/doc/find_flow_cost.html | 10
   /dev/null | 264 ----------------------------------------
   trunk/libs/graph/doc/successive_shortest_path_nonnegative_weights.html | 14 +-
   trunk/libs/graph/doc/table_of_contents.html | 6
   trunk/libs/graph/example/Jamfile.v2 | 2
   trunk/libs/graph/example/cycle_canceling_example.cpp | 9 +
   /dev/null | 21 ---
   trunk/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp | 13 +
   trunk/libs/graph/test/Jamfile.v2 | 2
   trunk/libs/graph/test/cycle_canceling_test.cpp | 9 +
   trunk/libs/graph/test/min_cost_max_flow_utils.hpp | 16 +-
   trunk/libs/graph/test/successive_shortest_path_nonnegative_weights_test.cpp | 19 ++
   /dev/null | 55 --------
   17 files changed, 93 insertions(+), 650 deletions(-)

Modified: trunk/boost/graph/cycle_canceling.hpp
==============================================================================
--- trunk/boost/graph/cycle_canceling.hpp Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/boost/graph/cycle_canceling.hpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -92,7 +92,7 @@
 }
 
 
-//in this namespace argument dispatching tak place
+//in this namespace argument dispatching takes place
 namespace detail {
 
 template <class Graph, class P, class T, class R, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance>

Deleted: trunk/boost/graph/successive_shortest_path.hpp
==============================================================================
--- trunk/boost/graph/successive_shortest_path.hpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85567)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,261 +0,0 @@
-//=======================================================================
-// Copyright 2013 University of Warsaw.
-// Authors: Piotr Wygocki
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//=======================================================================
-//
-//This algorithm is described in "Network Flows: Theory, Algorithms, and Applications"
-// by Ahuja, Magnanti, Orlin.
-
-#ifndef BOOST_GRAPH_SUCCESSIVE_SHORTEST_PATH_HPP
-#define BOOST_GRAPH_SUCCESSIVE_SHORTEST_PATH_HPP
-
-#include <numeric>
-
-#include <boost/property_map/property_map.hpp>
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/graph_concepts.hpp>
-#include <boost/pending/indirect_cmp.hpp>
-#include <boost/pending/relaxed_heap.hpp>
-#include <boost/graph/dijkstra_shortest_paths.hpp>
-#include <boost/graph/properties.hpp>
-#include <boost/graph/iteration_macros.hpp>
-#include <boost/graph/detail/augment.hpp>
-
-namespace boost {
-
-
-namespace detail {
-
-template <class Graph, class Weight, class Distance, class Reversed>
-class MapReducedWeight :
- public put_get_helper<typename property_traits<Weight>::value_type, MapReducedWeight<Graph, Weight, Distance, Reversed> > {
- typedef graph_traits<Graph> gtraits;
-public:
- typedef boost::readable_property_map_tag category;
- typedef typename property_traits<Weight>::value_type value_type;
- typedef value_type reference;
- typedef typename gtraits::edge_descriptor key_type;
- MapReducedWeight(const Graph & g, Weight w, Distance d, Reversed r) :
- g_(g), weight_(w), distance_(d), rev_(r) {}
-
- reference operator[](key_type v) const {
- return get(distance_, source(v, g_)) - get(distance_,target(v, g_)) + get(weight_, v);
- }
-private:
- const Graph & g_;
- Weight weight_;
- Distance distance_;
- Reversed rev_;
-};
-
-template <class Graph, class Weight, class Distance, class Reversed>
-MapReducedWeight<Graph, Weight, Distance, Reversed>
-make_mapReducedWeight(const Graph & g, Weight w, Distance d, Reversed r) {
- return MapReducedWeight<Graph, Weight, Distance, Reversed>(g, w, d, r);
-}
-
-}//detail
-
-
-template <class Graph, class Capacity, class ResidualCapacity, class Reversed, class Pred, class Weight, class Distance, class Distance2, class VertexIndex>
-void successive_shortest_path(
- const Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- Distance distance,
- Distance2 distance_prev) {
- filtered_graph<const Graph, is_residual_edge<ResidualCapacity> >
- gres = detail::residual_graph(g, residual_capacity);
- typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
-
- BGL_FORALL_EDGES_T(e, g, Graph) {
- put(residual_capacity, e, get(capacity, e));
- }
-
- BGL_FORALL_VERTICES_T(v, g, Graph) {
- put(distance_prev, v, 0);
- }
-
- while(true) {
- BGL_FORALL_VERTICES_T(v, g, Graph) {
- put(pred, v, edge_descriptor());
- }
- dijkstra_shortest_paths(gres, s,
- weight_map(detail::make_mapReducedWeight(gres, weight, distance_prev, rev)).
- distance_map(distance).
- vertex_index_map(index).
- visitor(make_dijkstra_visitor(record_edge_predecessors(pred, on_edge_relaxed()))));
-
- if(get(pred, t) == edge_descriptor()) {
- break;
- }
-
- BGL_FORALL_VERTICES_T(v, g, Graph) {
- put(distance_prev, v, get(distance_prev, v) + get(distance, v));
- }
-
- detail::augment(g, s, t, pred, residual_capacity, rev);
- }
-}
-
-//in this namespace argument dispatching tak place
-namespace detail {
-
-template <class Graph, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class Distance2, class VertexIndex>
-void successive_shortest_path_dispatch3(
- const Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- Distance dist,
- Distance2 dist_pred) {
- successive_shortest_path(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, dist_pred);
-}
-
-//setting default distance map
-template <class Graph, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class VertexIndex>
-void successive_shortest_path_dispatch3(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- Distance dist,
- param_not_found) {
- typedef typename property_traits<Weight>::value_type D;
-
- std::vector<D> d_map(num_vertices(g));
-
- successive_shortest_path(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist,
- make_iterator_property_map(d_map.begin(), index));
-}
-
-template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class VertexIndex>
-void successive_shortest_path_dispatch2(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- Distance dist,
- const bgl_named_params<P, T, R>& params) {
- successive_shortest_path_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, get_param(params, vertex_distance2));
-}
-
-//setting default distance map
-template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class VertexIndex>
-void successive_shortest_path_dispatch2(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- param_not_found,
- const bgl_named_params<P, T, R>& params) {
- typedef typename property_traits<Weight>::value_type D;
-
- std::vector<D> d_map(num_vertices(g));
-
- successive_shortest_path_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
- make_iterator_property_map(d_map.begin(), index),
- get_param(params, vertex_distance2));
-}
-
-template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class VertexIndex>
-void successive_shortest_path_dispatch1(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- const bgl_named_params<P, T, R>& params) {
- successive_shortest_path_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
- get_param(params, vertex_distance), params);
-}
-
-//setting default predecessors map
-template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class VertexIndex>
-void successive_shortest_path_dispatch1(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- param_not_found,
- const bgl_named_params<P, T, R>& params) {
- typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
- std::vector<edge_descriptor> pred_vec(num_vertices(g));
-
- successive_shortest_path_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index,
- make_iterator_property_map(pred_vec.begin(), index),
- get_param(params, vertex_distance), params);
-}
-
-}//detail
-
-
-template <class Graph, class P, class T, class R>
-void successive_shortest_path(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t,
- const bgl_named_params<P, T, R>& params) {
-
- return detail::successive_shortest_path_dispatch1(g, s, t,
- choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity),
- choose_pmap(get_param(params, edge_residual_capacity),
- g, edge_residual_capacity),
- choose_const_pmap(get_param(params, edge_weight), g, edge_weight),
- choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse),
- choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
- get_param(params, vertex_predecessor),
- params);
-}
-
-template <class Graph>
-void successive_shortest_path(
- Graph &g,
- typename graph_traits<Graph>::vertex_descriptor s,
- typename graph_traits<Graph>::vertex_descriptor t) {
- bgl_named_params<int, buffer_param_t> params(0);
- successive_shortest_path(g, s, t, params);
-}
-
-
-}//boost
-#endif /* BOOST_GRAPH_SUCCESSIVE_SHORTEST_PATH_HPP */
-

Copied and modified: trunk/boost/graph/successive_shortest_path_nonnegative_weights.hpp (from r85565, trunk/boost/graph/successive_shortest_path.hpp)
==============================================================================
--- trunk/boost/graph/successive_shortest_path.hpp Wed Sep 4 11:16:29 2013 (r85565, copy source)
+++ trunk/boost/graph/successive_shortest_path_nonnegative_weights.hpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -62,7 +62,7 @@
 
 
 template <class Graph, class Capacity, class ResidualCapacity, class Reversed, class Pred, class Weight, class Distance, class Distance2, class VertexIndex>
-void successive_shortest_path(
+void successive_shortest_path_nonnegative_weights(
         const Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -112,7 +112,7 @@
 namespace detail {
 
 template <class Graph, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class Distance2, class VertexIndex>
-void successive_shortest_path_dispatch3(
+void successive_shortest_path_nonnegative_weights_dispatch3(
         const Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -124,12 +124,12 @@
         Pred pred,
         Distance dist,
         Distance2 dist_pred) {
- successive_shortest_path(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, dist_pred);
+ successive_shortest_path_nonnegative_weights(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, dist_pred);
 }
 
 //setting default distance map
 template <class Graph, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class VertexIndex>
-void successive_shortest_path_dispatch3(
+void successive_shortest_path_nonnegative_weights_dispatch3(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -145,12 +145,12 @@
 
     std::vector<D> d_map(num_vertices(g));
 
- successive_shortest_path(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist,
+ successive_shortest_path_nonnegative_weights(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist,
                              make_iterator_property_map(d_map.begin(), index));
 }
 
 template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class Distance, class VertexIndex>
-void successive_shortest_path_dispatch2(
+void successive_shortest_path_nonnegative_weights_dispatch2(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -162,12 +162,12 @@
         Pred pred,
         Distance dist,
         const bgl_named_params<P, T, R>& params) {
- successive_shortest_path_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, get_param(params, vertex_distance2));
+ successive_shortest_path_nonnegative_weights_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred, dist, get_param(params, vertex_distance2));
 }
 
 //setting default distance map
 template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class VertexIndex>
-void successive_shortest_path_dispatch2(
+void successive_shortest_path_nonnegative_weights_dispatch2(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -183,13 +183,13 @@
 
     std::vector<D> d_map(num_vertices(g));
 
- successive_shortest_path_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
+ successive_shortest_path_nonnegative_weights_dispatch3(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
             make_iterator_property_map(d_map.begin(), index),
             get_param(params, vertex_distance2));
 }
 
 template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class Pred, class VertexIndex>
-void successive_shortest_path_dispatch1(
+void successive_shortest_path_nonnegative_weights_dispatch1(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -200,13 +200,13 @@
         VertexIndex index,
         Pred pred,
         const bgl_named_params<P, T, R>& params) {
- successive_shortest_path_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
+ successive_shortest_path_nonnegative_weights_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index, pred,
                                 get_param(params, vertex_distance), params);
 }
 
 //setting default predecessors map
 template <class Graph, class P, class T, class R, class Capacity, class ResidualCapacity, class Weight, class Reversed, class VertexIndex>
-void successive_shortest_path_dispatch1(
+void successive_shortest_path_nonnegative_weights_dispatch1(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
@@ -220,7 +220,7 @@
     typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
     std::vector<edge_descriptor> pred_vec(num_vertices(g));
 
- successive_shortest_path_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index,
+ successive_shortest_path_nonnegative_weights_dispatch2(g, s, t, capacity, residual_capacity, weight, rev, index,
             make_iterator_property_map(pred_vec.begin(), index),
             get_param(params, vertex_distance), params);
 }
@@ -229,13 +229,13 @@
 
 
 template <class Graph, class P, class T, class R>
-void successive_shortest_path(
+void successive_shortest_path_nonnegative_weights(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t,
         const bgl_named_params<P, T, R>& params) {
            
- return detail::successive_shortest_path_dispatch1(g, s, t,
+ return detail::successive_shortest_path_nonnegative_weights_dispatch1(g, s, t,
            choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity),
            choose_pmap(get_param(params, edge_residual_capacity),
                        g, edge_residual_capacity),
@@ -247,12 +247,12 @@
 }
 
 template <class Graph>
-void successive_shortest_path(
+void successive_shortest_path_nonnegative_weights(
         Graph &g,
         typename graph_traits<Graph>::vertex_descriptor s,
         typename graph_traits<Graph>::vertex_descriptor t) {
     bgl_named_params<int, buffer_param_t> params(0);
- successive_shortest_path(g, s, t, params);
+ successive_shortest_path_nonnegative_weights(g, s, t, params);
 }
 
 

Modified: trunk/libs/graph/doc/cycle_canceling.html
==============================================================================
--- trunk/libs/graph/doc/cycle_canceling.html Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/doc/cycle_canceling.html 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -56,7 +56,7 @@
 Note that edges from <i>E</i> can have negative weights.
 <p>
 If weights in the graph are nonnegative, the
-successive_shortest_path()
+successive_shortest_path_nonnegative_weights()
 might be better choice for min cost max flow.
 
 <p>
@@ -78,7 +78,7 @@
 <H3>Where Defined</H3>
 
 <P>
-boost/graph/successive_shortest_path.hpp
+boost/graph/successive_shortest_path_nonnegative_weights.hpp
 
 <P>
 
@@ -191,7 +191,7 @@
 
 <h3>See Also</h3>
 
-successive_shortest_path()<br>
+successive_shortest_path_nonnegative_weights()<br>
 <a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
 
 <br>

Modified: trunk/libs/graph/doc/find_flow_cost.html
==============================================================================
--- trunk/libs/graph/doc/find_flow_cost.html Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/doc/find_flow_cost.html 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -42,13 +42,13 @@
 
 <p>
 In order to compute the min cost max flow use :
-successive_shortest_path() or
+successive_shortest_path_nonnegative_weights() or
 <a href="./cycle_canceling.html"><tt>cycle_canceling()</tt></a>.
 
 <H3>Where Defined</H3>
 
 <P>
-boost/graph/successive_shortest_path.hpp
+boost/graph/successive_shortest_path_nonnegative_weights.hpp
 
 <P>
 
@@ -102,13 +102,13 @@
 
 <h3>Example</h3>
 
-The function is used in the successive_shortest_path example. The program in <a
-href="../example/successive_shortest_path_example.cpp"><tt>example/successive_shortest_path_example.cpp</tt></a>.
+The function is used in the successive_shortest_path_nonnegative_weights example. The program in <a
+href="../example/successive_shortest_path_nonnegative_weights_example.cpp"><tt>example/successive_shortest_path_nonnegative_weights_example.cpp</tt></a>.
 
 <h3>See Also</h3>
 
 <a href="./cycle_canceling.html"><tt>cycle_canceling()</tt></a><br>
-successive_shortest_path().
+successive_shortest_path_nonnegative_weights().
 
 <br>
 <HR>

Deleted: trunk/libs/graph/doc/successive_shortest_path.html
==============================================================================
--- trunk/libs/graph/doc/successive_shortest_path.html 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85567)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,264 +0,0 @@
-<HTML>
-<!--
- Copyright (c) Piotr Wygocki 2013
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
- -->
-<Head>
-<Title>Boost Graph Library: Successive Shortest Path for Min Cost Max Flow</Title>
-<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
- ALINK="#ff0000">
-<IMG SRC="../../../boost.png"
- ALT="C++ Boost" width="277" height="86">
-
-<BR Clear>
-
-<H1><A NAME="sec:successive_shortest_path">
-<TT>successive_shortest_path</TT>
-</H1>
-
-<PRE>
-<i>// named parameter version</i>
-template &lt;class Graph, class P, class T, class R&gt;
-void successive_shortest_path(
- Graph &amp;g,
- typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
- typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
- const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>)
-
-<i>// non-named parameter version</i>
-template &lt;class Graph, class Capacity, class ResidualCapacity, class Reversed, class Pred, class Weight, class Distance, class Distance2, class VertexIndex&gt;
-void successive_shortest_path(
- const Graph &amp; g,
- typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
- typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
- Capacity capacity,
- ResidualCapacity residual_capacity,
- Weight weight,
- Reversed rev,
- VertexIndex index,
- Pred pred,
- Distance distance,
- Distance2 distance_prev)
-</PRE>
-
-<P>
-The <tt>successive_shortest_path()</tt> function calculates the minimum cost maximum flow of a network. See Section <a
-href="./graph_theory_review.html#sec:network-flow-algorithms">Network
-Flow Algorithms</a> for a description of maximum flow.
- The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
-<i>E</i>, which are returned in the form of the residual capacity
-<i>r(u,v) = c(u,v) - f(u,v)</i>.
-
-<p>
-There are several special requirements on the input graph and property
-map parameters for this algorithm. First, the directed graph
-<i>G=(V,E)</i> that represents the network must be augmented to
-include the reverse edge for every edge in <i>E</i>. That is, the
-input graph should be <i>G<sub>in</sub> = (V,{E U
-E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt>
-must map each edge in the original graph to its reverse edge, that is
-<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>. The
-<tt>CapacityEdgeMap</tt> argument <tt>cap</tt> must map each edge in
-<i>E</i> to a positive number, and each edge in <i>E<sup>T</sup></i>
-to 0. The <tt>WeightMap</tt> has to map each edge from <i>E</i> to nonnegative number, and each edge from <i>E<sup>T</sup></i> to <i>-weight</i> of its reversed edge.
-
-<p>
-The algorithm is described in <a
-href="./bibliography.html#ahuja93:_network_flows">Network Flows</a>.
-
-<p>
-This algorithm starts with empty flow and in each round augments the shortest path (in terms of weight) in the residual graph.
-
-<p>
-In order to find the cost of the result flow use:
-find_flow_cost().
-
-<H3>Where Defined</H3>
-
-<P>
-boost/graph/successive_shortest_path.hpp
-
-<P>
-
-<h3>Parameters</h3>
-
-IN: <tt>Graph&amp; g</tt>
-<blockquote>
- A directed graph. The
- graph's type must be a model of <a
- href="./VertexListGraph.html">VertexListGraph</a> and IncidenceGraph For each edge
- <i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
- be in the graph.
-</blockquote>
-
-IN: <tt>vertex_descriptor s</tt>
-<blockquote>
- The source vertex for the flow network graph.
-</blockquote>
-
-IN: <tt>vertex_descriptor t</tt>
-<blockquote>
- The sink vertex for the flow network graph.
-</blockquote>
-
-<h3>Named Parameters</h3>
-
-
-IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
-<blockquote>
- The edge capacity property map. The type must be a model of a
- constant <a
- href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>. The
- key type of the map must be the graph's edge descriptor type.<br>
- <b>Default:</b> <tt>get(edge_capacity, g)</tt>
-</blockquote>
-
-OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
-<blockquote>
- This maps edges to their residual capacity. The type must be a model
- of a mutable <a
- href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
- Map</a>. The key type of the map must be the graph's edge descriptor
- type.<br>
- <b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
-</blockquote>
-
-IN: <tt>reverse_edge_map(ReverseEdgeMap rev)</tt>
-<blockquote>
- An edge property map that maps every edge <i>(u,v)</i> in the graph
- to the reverse edge <i>(v,u)</i>. The map must be a model of
- constant <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue
- Property Map</a>. The key type of the map must be the graph's edge
- descriptor type.<br>
- <b>Default:</b> <tt>get(edge_reverse, g)</tt>
-</blockquote>
-
-IN: <tt>weight_map(WeightMap w_map)</tt>
-<blockquote>
- The weight or ``cost'' of each edge in the graph. The weights
- must all be non-negative, and the algorithm will throw a
- negative_edge
- exception if one of the edges is negative.
- The type <tt>WeightMap</tt> must be a model of
- Readable Property Map. The edge descriptor type of
- the graph needs to be usable as the key type for the weight
- map. The value type for this map must be
- the same as the value type of the distance map.<br>
- <b>Default:</b> <tt>get(edge_weight, g)</tt><br>
-
-</blockquote>
-
-UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
-<blockquote>
- Use by the algorithm to store augmenting paths. The map must be a
- model of mutable <a
- href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
- The key type must be the graph's vertex descriptor type and the
- value type must be the graph's edge descriptor type.<br>
-
- <b>Default:</b> an <a
- href="../../property_map/doc/iterator_property_map.html">
- <tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
- of edge descriptors of size <tt>num_vertices(g)</tt> and
- using the <tt>i_map</tt> for the index map.
-</blockquote>
-
-UTIL: <tt>distance_map(DistanceMap d_map)</tt>
-<blockquote>
- The shortest path weight from the source vertex <tt>s</tt> to each
- vertex in the graph <tt>g</tt> is recorded in this property map. The
- shortest path weight is the sum of the edge weights along the
- shortest path. The type <tt>DistanceMap</tt> must be a model of <a
- href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
- Property Map</a>. The vertex descriptor type of the graph needs to
- be usable as the key type of the distance map.
-
- <b>Default:</b> <a
- href="../../property_map/doc/iterator_property_map.html">
- <tt>iterator_property_map</tt></a> created from a
- <tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
- <tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
- map.<br>
-
-</blockquote>
-
-UTIL: <tt>distance_map2(DistanceMap2 d_map2)</tt>
-<blockquote>
- The shortest path computation in iteration nr <i>k</i> uses distances computed in iteration <i>k</i>.
- The type <tt>DistanceMap2</tt> must be a model of <a
- href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
- Property Map</a>. The vertex descriptor type of the graph needs to
- be usable as the key type of the distance map.
-
- <b>Default:</b> <a
- href="../../property_map/doc/iterator_property_map.html">
- <tt>iterator_property_map</tt></a> created from a
- <tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
- <tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
- map.<br>
-
-</blockquote>
-
-IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
-<blockquote>
- Maps each vertex of the graph to a unique integer in the range
- <tt>[0, num_vertices(g))</tt>. This property map is only needed
- if the default for the distance or distance2 or predecessor map is used.
- The vertex index map must be a model of <a
- href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
- Map</a>. The key type of the map must be the graph's vertex
- descriptor type.<br>
- <b>Default:</b> <tt>get(vertex_index, g)</tt>
- Note: if you use this default, make sure your graph has
- an internal <tt>vertex_index</tt> property. For example,
- <tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
- not have an internal <tt>vertex_index</tt> property.
-</blockquote>
-
-
-<h3>Complexity</h3>
-In the integer capacity case, if <i>U</i> is the value of the max flow, then the complexity is <i> O(U * (|E| + |V|*log|V|))</i>,
-where <i>O(|E| + |V|*log|V|)</i> is the complexity of the dijkstra algorithm and <i>U</i> is upper bound on number of iteration.
-In many real world cases number of iterations is much smaller than <i>U</i>.
-
-
-<h3>Example</h3>
-
-The program in <a
-href="../example/successive_shortest_path_example.cpp"><tt>example/successive_shortest_path_example.cpp</tt></a>.
-
-<h3>See Also</h3>
-
-cycle_canceling()<br>
-find_flow_cost().
-
-<br>
-<HR>
-<TABLE>
-<TR valign=top>
-<TD nowrap>Copyright &copy; 2013</TD><TD>
-Piotr Wygocki, University of Warsaw (<A HREF="mailto:wygos_at_[hidden]">wygos at mimuw.edu.pl</A>)
-</TD></TR></TABLE>
-
-</BODY>
-</HTML>
-<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
- -->
-<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
- -->
-<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
- -->
-<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
- -->
-<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
- -->
-<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
- -->
-<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
- -->
-<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
-p -->
-

Copied and modified: trunk/libs/graph/doc/successive_shortest_path_nonnegative_weights.html (from r85565, trunk/libs/graph/doc/successive_shortest_path.html)
==============================================================================
--- trunk/libs/graph/doc/successive_shortest_path.html Wed Sep 4 11:16:29 2013 (r85565, copy source)
+++ trunk/libs/graph/doc/successive_shortest_path_nonnegative_weights.html 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -15,14 +15,14 @@
 
 <BR Clear>
 
-<H1><A NAME="sec:successive_shortest_path">
-<TT>successive_shortest_path</TT>
+<H1><A NAME="sec:successive_shortest_path_nonnegative_weights">
+<TT>successive_shortest_path_nonnegative_weights</TT>
 </H1>
 
 <PRE>
 <i>// named parameter version</i>
 template &lt;class Graph, class P, class T, class R&gt;
-void successive_shortest_path(
+void successive_shortest_path_nonnegative_weights(
         Graph &amp;g,
         typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
         typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
@@ -30,7 +30,7 @@
 
 <i>// non-named parameter version</i>
 template &lt;class Graph, class Capacity, class ResidualCapacity, class Reversed, class Pred, class Weight, class Distance, class Distance2, class VertexIndex&gt;
-void successive_shortest_path(
+void successive_shortest_path_nonnegative_weights(
         const Graph &amp; g,
         typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
         typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
@@ -45,7 +45,7 @@
 </PRE>
 
 <P>
-The <tt>successive_shortest_path()</tt> function calculates the minimum cost maximum flow of a network. See Section <a
+The <tt>successive_shortest_path_nonnegative_weights()</tt> function calculates the minimum cost maximum flow of a network. See Section <a
 href="./graph_theory_review.html#sec:network-flow-algorithms">Network
 Flow Algorithms</a> for a description of maximum flow.
  The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
@@ -79,7 +79,7 @@
 <H3>Where Defined</H3>
 
 <P>
-boost/graph/successive_shortest_path.hpp
+boost/graph/successive_shortest_path_nonnegative_weights.hpp
 
 <P>
 
@@ -228,7 +228,7 @@
 <h3>Example</h3>
 
 The program in <a
-href="../example/successive_shortest_path_example.cpp"><tt>example/successive_shortest_path_example.cpp</tt></a>.
+href="../example/successive_shortest_path_nonnegative_weights_example.cpp"><tt>example/successive_shortest_path_nonnegative_weights_example.cpp</tt></a>.
 
 <h3>See Also</h3>
 

Modified: trunk/libs/graph/doc/table_of_contents.html
==============================================================================
--- trunk/libs/graph/doc/table_of_contents.html Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/doc/table_of_contents.html 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -214,6 +214,12 @@
                   <li>boykov_kolmogorov_max_flow</li>
                   <LI>edmonds_maximum_cardinality_matching
                 </OL>
+ <LI>Minimum Cost Maximum Flow Algorithms
+ <OL>
+ <LI>cycle_canceling
+ <LI>successive_shortest_path_nonnegative_weights
+ <li>find_flow_cost</li>
+ </OL>
               <LI>Minimum Cut Algorithms
                 <OL>
                   <LI>stoer_wagner_min_cut

Modified: trunk/libs/graph/example/Jamfile.v2
==============================================================================
--- trunk/libs/graph/example/Jamfile.v2 Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/example/Jamfile.v2 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -52,6 +52,6 @@
 exe sloan_ordering : sloan_ordering.cpp ;
 exe hawick_circuits : hawick_circuits.cpp ;
 exe edge_coloring : edge_coloring.cpp ;
-exe successive_shortest_path_example : successive_shortest_path_example.cpp ;
+exe successive_shortest_path_nonnegative_weights_example : successive_shortest_path_nonnegative_weights_example.cpp ;
 exe cycle_canceling_example : cycle_canceling_example.cpp ;
 

Modified: trunk/libs/graph/example/cycle_canceling_example.cpp
==============================================================================
--- trunk/libs/graph/example/cycle_canceling_example.cpp Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/example/cycle_canceling_example.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -1,3 +1,12 @@
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
 #include <boost/graph/cycle_canceling.hpp>
 #include <boost/graph/edmonds_karp_max_flow.hpp>
 

Deleted: trunk/libs/graph/example/successive_shortest_path_example.cpp
==============================================================================
--- trunk/libs/graph/example/successive_shortest_path_example.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85567)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,21 +0,0 @@
-#include <boost/graph/successive_shortest_path.hpp>
-#include <boost/graph/find_flow_cost.hpp>
-
-#include "../test/min_cost_max_flow_utils.hpp"
-
-
-int main() {
- unsigned s,t;
- boost::SampleGraph::Graph g
- = boost::SampleGraph::getSampleGraph(s, t);
-
- boost::successive_shortest_path(g, s, t);
-
- int cost = boost::find_flow_cost(g);
- assert(cost == 29);
-
- return 0;
-}
-
-
-

Copied and modified: trunk/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp (from r85565, trunk/libs/graph/example/successive_shortest_path_example.cpp)
==============================================================================
--- trunk/libs/graph/example/successive_shortest_path_example.cpp Wed Sep 4 11:16:29 2013 (r85565, copy source)
+++ trunk/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -1,4 +1,13 @@
-#include <boost/graph/successive_shortest_path.hpp>
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/successive_shortest_path_nonnegative_weights.hpp>
 #include <boost/graph/find_flow_cost.hpp>
 
 #include "../test/min_cost_max_flow_utils.hpp"
@@ -9,7 +18,7 @@
     boost::SampleGraph::Graph g
         = boost::SampleGraph::getSampleGraph(s, t);
 
- boost::successive_shortest_path(g, s, t);
+ boost::successive_shortest_path_nonnegative_weights(g, s, t);
 
     int cost = boost::find_flow_cost(g);
     assert(cost == 29);

Modified: trunk/libs/graph/test/Jamfile.v2
==============================================================================
--- trunk/libs/graph/test/Jamfile.v2 Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/test/Jamfile.v2 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -128,7 +128,7 @@
     [ compile filtered_graph_properties_dijkstra.cpp ]
     [ run vf2_sub_graph_iso_test.cpp ]
     [ run hawick_circuits.cpp ]
- [ run successive_shortest_path_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
+ [ run successive_shortest_path_nonnegative_weights_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
     [ run cycle_canceling_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
     ;
 

Modified: trunk/libs/graph/test/cycle_canceling_test.cpp
==============================================================================
--- trunk/libs/graph/test/cycle_canceling_test.cpp Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/test/cycle_canceling_test.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -1,3 +1,12 @@
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
 #define BOOST_TEST_MODULE cycle_canceling_test
 
 #include <boost/test/unit_test.hpp>

Modified: trunk/libs/graph/test/min_cost_max_flow_utils.hpp
==============================================================================
--- trunk/libs/graph/test/min_cost_max_flow_utils.hpp Wed Sep 4 16:47:36 2013 (r85567)
+++ trunk/libs/graph/test/min_cost_max_flow_utils.hpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -1,10 +1,12 @@
-/**
- * @file sample_graph_undirected.hpp
- * @brief
- * @author Piotr Wygocki
- * @version 1.0
- * @date 2013-06-17
- */
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
 #ifndef SAMPLE_GRAPH_UNDIRECTED_HPP
 #define SAMPLE_GRAPH_UNDIRECTED_HPP
 

Copied and modified: trunk/libs/graph/test/successive_shortest_path_nonnegative_weights_test.cpp (from r85565, trunk/libs/graph/test/successive_shortest_path_test.cpp)
==============================================================================
--- trunk/libs/graph/test/successive_shortest_path_test.cpp Wed Sep 4 11:16:29 2013 (r85565, copy source)
+++ trunk/libs/graph/test/successive_shortest_path_nonnegative_weights_test.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85568)
@@ -1,8 +1,17 @@
-#define BOOST_TEST_MODULE successive_shortest_path_test
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#define BOOST_TEST_MODULE successive_shortest_path_nonnegative_weights_test
 
 #include <boost/test/unit_test.hpp>
 
-#include <boost/graph/successive_shortest_path.hpp>
+#include <boost/graph/successive_shortest_path_nonnegative_weights.hpp>
 #include <boost/graph/find_flow_cost.hpp>
 
 #include "min_cost_max_flow_utils.hpp"
@@ -13,7 +22,7 @@
     boost::SampleGraph::Graph g
         = boost::SampleGraph::getSampleGraph(s, t);
 
- boost::successive_shortest_path(g, s, t);
+ boost::successive_shortest_path_nonnegative_weights(g, s, t);
 
     int cost = boost::find_flow_cost(g);
     BOOST_CHECK_EQUAL(cost, 29);
@@ -24,7 +33,7 @@
     boost::SampleGraph::Graph g
         = boost::SampleGraph::getSampleGraph2(s, t);
 
- boost::successive_shortest_path(g, s, t);
+ boost::successive_shortest_path_nonnegative_weights(g, s, t);
 
     int cost = boost::find_flow_cost(g);
     BOOST_CHECK_EQUAL(cost, 7);
@@ -42,7 +51,7 @@
     std::vector<edge_descriptor> pred(N);
         
 
- boost::successive_shortest_path(g, s, t,
+ boost::successive_shortest_path_nonnegative_weights(g, s, t,
             boost::distance_map(&dist[0]).
             predecessor_map(&pred[0]).
             distance_map2(&dist_prev[0]).

Deleted: trunk/libs/graph/test/successive_shortest_path_test.cpp
==============================================================================
--- trunk/libs/graph/test/successive_shortest_path_test.cpp 2013-09-04 17:39:21 EDT (Wed, 04 Sep 2013) (r85567)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,55 +0,0 @@
-#define BOOST_TEST_MODULE successive_shortest_path_test
-
-#include <boost/test/unit_test.hpp>
-
-#include <boost/graph/successive_shortest_path.hpp>
-#include <boost/graph/find_flow_cost.hpp>
-
-#include "min_cost_max_flow_utils.hpp"
-
-
-BOOST_AUTO_TEST_CASE(path_augmentation_def_test) {
- unsigned s,t;
- boost::SampleGraph::Graph g
- = boost::SampleGraph::getSampleGraph(s, t);
-
- boost::successive_shortest_path(g, s, t);
-
- int cost = boost::find_flow_cost(g);
- BOOST_CHECK_EQUAL(cost, 29);
-}
-
-BOOST_AUTO_TEST_CASE(path_augmentation_def_test2) {
- unsigned s,t;
- boost::SampleGraph::Graph g
- = boost::SampleGraph::getSampleGraph2(s, t);
-
- boost::successive_shortest_path(g, s, t);
-
- int cost = boost::find_flow_cost(g);
- BOOST_CHECK_EQUAL(cost, 7);
-}
-
-BOOST_AUTO_TEST_CASE(path_augmentation_test) {
- unsigned s,t;
- typedef boost::SampleGraph::Graph Graph;
- Graph g = boost::SampleGraph::getSampleGraph(s, t);
-
- int N = boost::num_vertices(g);
- std::vector<int> dist(N);
- std::vector<int> dist_prev(N);
- typedef boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
- std::vector<edge_descriptor> pred(N);
-
-
- boost::successive_shortest_path(g, s, t,
- boost::distance_map(&dist[0]).
- predecessor_map(&pred[0]).
- distance_map2(&dist_prev[0]).
- vertex_index_map(boost::identity_property_map()));
-
- int cost = boost::find_flow_cost(g);
- BOOST_CHECK_EQUAL(cost, 29);
-}
-
-


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk