Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72334 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/date_time boost/date_time/posix_time boost/detail boost/filesystem boost/function boost/functional boost/functional/hash boost/fusion boost/fusion/container/list/detail boost/geometry boost/gil boost/graph boost/icl boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/iterator boost/msm boost/numeric/ublas boost/pool boost/program_options boost/program_options/detail boost/property_tree boost/range boost/serialization boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/typeof boost/unordered boost/utility boost/uuid boost/variant boost/wave boost/xpressive doc libs libs/algorithm/string libs/array libs/array/test libs/bimap libs/date_time libs/date_time/data libs/date_time/example/gregorian libs/date_time/example/local_time libs/date_time/example/posix_time libs/date_time/example/tutorial libs/date_time/test/posix_time libs/date_time/xmldoc libs/detail libs/filesystem libs/function libs/functional libs/functional/hash libs/fusion libs/geometry libs/geometry/doc libs/graph/doc libs/graph/example libs/graph/test libs/graph_parallel libs/graph_parallel/example libs/icl libs/icl/doc libs/icl/doc/html libs/icl/doc/html/header/boost/icl libs/icl/test libs/icl/test/test_doc_code_ libs/integer libs/interprocess libs/intrusive libs/io libs/io/doc libs/iostreams libs/iterator libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/ublas libs/numeric/ublas/doc libs/parameter/doc/html libs/phoenix/doc libs/phoenix/doc/examples libs/pool libs/program_options libs/program_options/test libs/property_tree libs/range libs/serialization libs/serialization/example libs/serialization/src libs/serialization/test libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/thread/src/win32 libs/timer libs/tr1 libs/type_traits libs/typeof/doc libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/quickbook/doc tools/quickbook/src tools/quickbook/test tools/regression tools/regression/src tools/release tools/wave
From: jewillco_at_[hidden]
Date: 2011-06-01 12:58:38


Author: jewillco
Date: 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
New Revision: 72334
URL: http://svn.boost.org/trac/boost/changeset/72334

Log:
Merged r71166, r71238, r71300, r71489, r71704, and r71929 from trunk
Properties modified:
   branches/release/ (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/algorithm/string/ (props changed)
   branches/release/boost/archive/ (props changed)
   branches/release/boost/array.hpp (props changed)
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/concept_check.hpp (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/cstdint.hpp (props changed)
   branches/release/boost/date_time/c_time.hpp (props changed)
   branches/release/boost/date_time/date_formatting.hpp (props changed)
   branches/release/boost/date_time/filetime_functions.hpp (props changed)
   branches/release/boost/date_time/gregorian_calendar.ipp (props changed)
   branches/release/boost/date_time/posix_time/time_serialize.hpp (props changed)
   branches/release/boost/date_time/strings_from_facet.hpp (props changed)
   branches/release/boost/date_time/time_facet.hpp (props changed)
   branches/release/boost/date_time/tz_db_base.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/boost/function/ (props changed)
   branches/release/boost/functional/ (props changed)
   branches/release/boost/functional/hash/ (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/fusion/container/list/detail/build_cons.hpp (props changed)
   branches/release/boost/geometry/ (props changed)
   branches/release/boost/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/icl/ (props changed)
   branches/release/boost/integer/ (props changed)
   branches/release/boost/integer.hpp (props changed)
   branches/release/boost/integer_fwd.hpp (props changed)
   branches/release/boost/integer_traits.hpp (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/io/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/iterator/ (props changed)
   branches/release/boost/iterator/iterator_facade.hpp (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/msm/active_state_switching_policies.hpp (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/pool/ (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/program_options/detail/parsers.hpp (props changed)
   branches/release/boost/program_options/parsers.hpp (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/range/ (props changed)
   branches/release/boost/regex.h (props changed)
   branches/release/boost/regex_fwd.hpp (props changed)
   branches/release/boost/serialization/ (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2/ (props changed)
   branches/release/boost/signals2.hpp (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/statechart/ (props changed)
   branches/release/boost/static_assert.hpp (props changed)
   branches/release/boost/system/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/token_functions.hpp (props changed)
   branches/release/boost/tr1/ (props changed)
   branches/release/boost/type_traits/ (props changed)
   branches/release/boost/typeof/message.hpp (props changed)
   branches/release/boost/typeof/register_functions.hpp (props changed)
   branches/release/boost/typeof/register_functions_iterate.hpp (props changed)
   branches/release/boost/typeof/typeof.hpp (props changed)
   branches/release/boost/typeof/unsupported.hpp (props changed)
   branches/release/boost/unordered/ (props changed)
   branches/release/boost/utility/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/uuid/ (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/boost/xpressive/ (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/doc/ (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/algorithm/string/ (props changed)
   branches/release/libs/array/ (props changed)
   branches/release/libs/array/test/array0.cpp (props changed)
   branches/release/libs/array/test/array2.cpp (props changed)
   branches/release/libs/array/test/array6.cpp (props changed)
   branches/release/libs/bimap/ (props changed)
   branches/release/libs/date_time/ (props changed)
   branches/release/libs/date_time/data/date_time_zonespec.csv (props changed)
   branches/release/libs/date_time/example/gregorian/days_between_new_years.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_since_year_start.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_till_new_year.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/month_add.cpp (props changed)
   branches/release/libs/date_time/example/local_time/flight.cpp (props changed)
   branches/release/libs/date_time/example/local_time/local_date_time.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/print_hours.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/time_math.cpp (props changed)
   branches/release/libs/date_time/example/tutorial/io_tutorial.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_facet.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp (props changed)
   branches/release/libs/date_time/xmldoc/date_class.xml (props changed)
   branches/release/libs/date_time/xmldoc/usage_examples.xml (props changed)
   branches/release/libs/detail/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/function/ (props changed)
   branches/release/libs/functional/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/geometry/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/index.html (props changed)
   branches/release/libs/graph/doc/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/icl/ (props changed)
   branches/release/libs/icl/doc/ (props changed)
   branches/release/libs/icl/doc/html/ (props changed)
   branches/release/libs/icl/doc/html/header/boost/icl/ (props changed)
   branches/release/libs/icl/test/ (props changed)
   branches/release/libs/icl/test/test_doc_code_/ (props changed)
   branches/release/libs/integer/ (props changed)
   branches/release/libs/interprocess/ (props changed)
   branches/release/libs/intrusive/ (props changed)
   branches/release/libs/io/ (props changed)
   branches/release/libs/io/doc/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/iterator/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/mpi/build/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/msm/ (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/parameter/doc/html/index.html (props changed)
   branches/release/libs/phoenix/doc/basics.qbk (props changed)
   branches/release/libs/phoenix/doc/examples/extending_actors.qbk (props changed)
   branches/release/libs/phoenix/doc/organisation.qbk (props changed)
   branches/release/libs/pool/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/program_options/test/parsers_test.cpp (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/range/ (props changed)
   branches/release/libs/serialization/ (props changed)
   branches/release/libs/serialization/example/ (props changed)
   branches/release/libs/serialization/src/ (props changed)
   branches/release/libs/serialization/test/test_diamond_complex.cpp (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/statechart/ (props changed)
   branches/release/libs/static_assert/ (props changed)
   branches/release/libs/system/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/thread/src/win32/thread.cpp (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/tr1/ (props changed)
   branches/release/libs/type_traits/ (props changed)
   branches/release/libs/typeof/doc/typeof.qbk (props changed)
   branches/release/libs/unordered/ (props changed)
   branches/release/libs/utility/ (props changed)
   branches/release/libs/utility/assert.html (props changed)
   branches/release/libs/utility/assert_test.cpp (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/uuid/ (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/more/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/status/Jamfile.v2 (props changed)
   branches/release/status/explicit-failures-markup.xml (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/bcp/ (props changed)
   branches/release/tools/boostbook/ (props changed)
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/quickbook/doc/ (props changed)
   branches/release/tools/quickbook/src/ (props changed)
   branches/release/tools/quickbook/test/ (props changed)
   branches/release/tools/regression/ (props changed)
   branches/release/tools/regression/src/library_status.cpp (props changed)
   branches/release/tools/release/ (props changed)
   branches/release/tools/wave/ (props changed)
Text files modified:
   branches/release/boost/graph/chrobak_payne_drawing.hpp | 18 ++++++++++++++----
   branches/release/libs/graph/doc/floyd_warshall_shortest.html | 2 +-
   branches/release/libs/graph/doc/write-graphviz.html | 40 ++++++++++++++++++++--------------------
   branches/release/libs/graph/example/min_max_paths.cpp | 3 +++
   branches/release/libs/graph/test/random_spanning_tree_test.cpp | 2 +-
   branches/release/libs/graph_parallel/example/breadth_first_search.cpp | 9 +++++++++
   6 files changed, 48 insertions(+), 26 deletions(-)

Modified: branches/release/boost/graph/chrobak_payne_drawing.hpp
==============================================================================
--- branches/release/boost/graph/chrobak_payne_drawing.hpp (original)
+++ branches/release/boost/graph/chrobak_payne_drawing.hpp 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -34,12 +34,22 @@
                             VertexToVertexMap left,
                             VertexToVertexMap right)
     {
- if (v != graph_traits<Graph>::null_vertex())
- {
+ typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+ // Suggestion of explicit stack from Aaron Windsor to avoid system stack
+ // overflows.
+ typedef std::pair<vertex_descriptor, std::size_t> stack_entry;
+ std::stack<stack_entry> st;
+ st.push(stack_entry(v, offset));
+ while (!st.empty()) {
+ vertex_descriptor v = st.top().first;
+ std::size_t offset = st.top().second;
+ st.pop();
+ if (v != graph_traits<Graph>::null_vertex()) {
           x[v] += delta_x[v] + offset;
- accumulate_offsets(left[v], x[v], g, x, delta_x, left, right);
- accumulate_offsets(right[v], x[v], g, x, delta_x, left, right);
+ st.push(stack_entry(left[v], x[v]));
+ st.push(stack_entry(right[v], x[v]));
         }
+ }
     }
 
   } /*namespace detail*/ } /*namespace graph*/

Modified: branches/release/libs/graph/doc/floyd_warshall_shortest.html
==============================================================================
--- branches/release/libs/graph/doc/floyd_warshall_shortest.html (original)
+++ branches/release/libs/graph/doc/floyd_warshall_shortest.html 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -134,7 +134,7 @@
 <blockquote>
 The value used to initialize the distance for each vertex before
 starting the algorithm, and to represent the distance between vertices
-for which there is not path. Should be larger than any possible valid
+for which there is no path. Should be larger than any possible valid
 path length. The argument type must match the value type of the <code>
 WeightMap</code>.<br>
 

Modified: branches/release/libs/graph/doc/write-graphviz.html
==============================================================================
--- branches/release/libs/graph/doc/write-graphviz.html (original)
+++ branches/release/libs/graph/doc/write-graphviz.html 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -134,7 +134,7 @@
   public:
     label_writer(Name _name) : name(_name) {}
     template &lt;class VertexOrEdge&gt;
- void operator()(std::ostream& out, const VertexOrEdge& v) const {
+ void operator()(std::ostream&amp; out, const VertexOrEdge&amp; v) const {
       out &lt;&lt; "[label=\"" &lt;&lt; name[v] &lt;&lt; "\"]";
     }
   private:
@@ -154,13 +154,13 @@
 A PropertyWriter
 for graphs is a functor which is called with one parameter of type
 <tt>std::ostream</tt> and should print a series of graph properties. The following
-code excerpt is an example of a PropertyWriter for a graph.
+code excerpt is an example of a PropertyWriter for a graph:
 <pre>
   struct sample_graph_writer {
- void operator()(std::ostream& out) const {
- out << "graph [bgcolor=lightgrey]" << std::endl;
- out << "node [shape=circle color=white]" << std::endl;
- out << "edge [style=dashed]" << std::endl;
+ void operator()(std::ostream&amp; out) const {
+ out &lt;&lt; "graph [bgcolor=lightgrey]" &lt;&lt; std::endl;
+ out &lt;&lt; "node [shape=circle color=white]" &lt;&lt; std::endl;
+ out &lt;&lt; "edge [style=dashed]" &lt;&lt; std::endl;
     }
   };
 }
@@ -168,9 +168,9 @@
 
 <p>
 There exists a class <tt>default_writer</tt>, which can be used as both
-vertex/edge and graph property writer, and does nothing. It comes handy when
-only edge properties must be written, but function interface requries to pass
-vertex property writer as well.
+vertex/edge and graph property writer, and does nothing. It is useful when
+only edge properties must be written, but the function interface also requires a
+vertex property writer.
 
 <h3>Parameters</h3>
  OUT: <tt>std::ostream&amp; out</tt>
@@ -181,38 +181,38 @@
  IN: <tt>VertexAndEdgeListGraph&amp; g</tt>
 <blockquote>
   A directed or undirected graph. The graph's type must be a model of
- VertexAndEdgeListGraph. Also the
+ VertexAndEdgeListGraph. In most cases, the
   graph must have an internal <tt>vertex_index</tt> property map.
 </blockquote>
 
  IN: <tt>VertexPropertyWriter vpw</tt>
 <blockquote>
- A functor that models PropertyWriter concept to print
+ A functor that models PropertyWriter to print
   properties of a vertex.<br>
 <b>Default</b>: <tt>default_writer()</tt>
 </blockquote>
 
  IN: <tt>EdgePropertyWriter epw</tt>
 <blockquote>
- A functor that models PropertyWriter concept to print
+ A functor that models PropertyWriter to print
   properties of an edge.<br>
 <b>Default</b>: <tt>default_writer()</tt>
 </blockquote>
 
  IN: <tt>GraphPropertyWriter epw</tt>
 <blockquote>
- A functor that models PropertyWriter concept to print
- properties of a graph.<br>
+ A functor that models PropertyWriter to print
+ properties of the graph.<br>
 <b>Default</b>: <tt>default_writer()</tt>
 </blockquote>
 
-IN: <tt>dynamic_properties& dp</tt>
+IN: <tt>dynamic_properties&amp; dp</tt>
 <blockquote>
   Contains all of the vertex and edge properties that should be
   emitted by the GraphViz writer.
 </blockquote>
 
-IN: <tt>const std::string& node_id</tt>
+IN: <tt>const std::string&amp; node_id</tt>
 <blockquote>
   The name of the property map that provides identifiers for the
   vertices in the graph.<br>
@@ -221,15 +221,15 @@
 
 IN: <tt>VertexID vertex_id</tt>
 <blockquote>
- A property map that models Readable Property Map whose key type is the vertex descriptor of the graph and whose value type can be written to a stream. The value should be a unique descriptor that can be used to name a node in a Graphviz file (so it should not, for instance, have any spaces in it).<br>
-<b>Default</b>: If no <code>dynamic_properties</code> object is provided, <tt>get(vertex_index, g)</tt>. Otherwise, a dynamic property map that accesses the property map named <code>node_id</code>.
+ A property map that models Readable Property Map, whose key type is the vertex descriptor of the graph, and whose value type can be written to a stream. The value should be a unique descriptor for each vertex, and will be used to name each node in the Graphviz file (it will be escaped properly for Graphviz output).<br>
+<b>Default</b>: If no <code>dynamic_properties</code> object is provided, <tt>get(vertex_index, g)</tt>. Otherwise, a dynamic property map that accesses the property map in <code>dp</code> whose name is given by the <code>node_id</code> parameter.
 </blockquote>
 <H3>
 Example
 </H3>
 
-This example demonstrates using BGL-graphviz interface to write
-a BGL graph into a graphviz format file.
+This example demonstrates using the BGL-Graphviz interface to write
+a BGL graph into a Graphviz format file.
 
 <pre>
 #include &lt;boost/graph/graphviz.hpp&gt;

Modified: branches/release/libs/graph/example/min_max_paths.cpp
==============================================================================
--- branches/release/libs/graph/example/min_max_paths.cpp (original)
+++ branches/release/libs/graph/example/min_max_paths.cpp 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -6,6 +6,9 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //=======================================================================
+
+#error "This example appears to be incorrect; it uses edge weights that are smaller than 0 using the comparison operator passed to Dijkstra's algorithm, which is not allowed."
+
 #include <boost/config.hpp>
 #include <iostream>
 

Modified: branches/release/libs/graph/test/random_spanning_tree_test.cpp
==============================================================================
--- branches/release/libs/graph/test/random_spanning_tree_test.cpp (original)
+++ branches/release/libs/graph/test/random_spanning_tree_test.cpp 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -48,7 +48,7 @@
 
 int main(int, char**) {
 
- array<size_t, 2> sizes = {{ 5, 5 }};
+ boost::array<size_t, 2> sizes = {{ 5, 5 }};
   graph_type g(sizes);
 
   shared_array_property_map<gt::vertex_descriptor, property_map<graph_type, vertex_index_t>::const_type> pred(num_vertices(g), get(vertex_index, g));

Modified: branches/release/libs/graph_parallel/example/breadth_first_search.cpp
==============================================================================
--- branches/release/libs/graph_parallel/example/breadth_first_search.cpp (original)
+++ branches/release/libs/graph_parallel/example/breadth_first_search.cpp 2011-06-01 12:58:36 EDT (Wed, 01 Jun 2011)
@@ -27,6 +27,9 @@
 // Graphviz Output
 #include <boost/graph/distributed/graphviz.hpp>
 
+// For choose_min_reducer
+#include <boost/graph/distributed/distributed_graph_utility.hpp>
+
 // Standard Library includes
 #include <fstream>
 #include <string>
@@ -71,6 +74,12 @@
   property_map<Graph, vertex_distance_t>::type distance =
     get(vertex_distance, g);
 
+ // Initialize distances to infinity and set reduction operation to 'min'
+ BGL_FORALL_VERTICES(v, g, Graph) {
+ put(distance, v, std::numeric_limits<std::size_t>::max());
+ }
+ distance.set_reduce(boost::graph::distributed::choose_min_reducer<std::size_t>());
+
   put(distance, start, 0);
   breadth_first_search
     (g, start,


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