Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63654 - in trunk: boost/graph libs/graph/test
From: jewillco_at_[hidden]
Date: 2010-07-05 11:08:09


Author: jewillco
Date: 2010-07-05 11:08:08 EDT (Mon, 05 Jul 2010)
New Revision: 63654
URL: http://svn.boost.org/trac/boost/changeset/63654

Log:
Fixed random spanning tree issues from regression tests
Text files modified:
   trunk/boost/graph/random_spanning_tree.hpp | 4 +++-
   trunk/libs/graph/test/random_spanning_tree_test.cpp | 2 +-
   2 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/graph/random_spanning_tree.hpp
==============================================================================
--- trunk/boost/graph/random_spanning_tree.hpp (original)
+++ trunk/boost/graph/random_spanning_tree.hpp 2010-07-05 11:08:08 EDT (Mon, 05 Jul 2010)
@@ -48,7 +48,9 @@
         if (get(color, v) != color_gen::white()) continue;
         loop_erased_random_walk(g, v, next_edge, color, path);
         for (typename std::vector<vertex_descriptor>::const_reverse_iterator i = path.rbegin();
- boost::next(i) != path.rend(); ++i) {
+ boost::next(i) !=
+ (typename std::vector<vertex_descriptor>::const_reverse_iterator)path.rend();
+ ++i) {
           typename std::vector<vertex_descriptor>::const_reverse_iterator j = i;
           ++j;
           assert (get(color, *j) == color_gen::gray());

Modified: trunk/libs/graph/test/random_spanning_tree_test.cpp
==============================================================================
--- trunk/libs/graph/test/random_spanning_tree_test.cpp (original)
+++ trunk/libs/graph/test/random_spanning_tree_test.cpp 2010-07-05 11:08:08 EDT (Mon, 05 Jul 2010)
@@ -56,7 +56,7 @@
 
   BGL_FORALL_EDGES(e, g, graph_type) {put(weight, e, (1. + get(edge_index, g, e)) / num_edges(g));}
 
- mt19937 gen;
+ boost::mt19937 gen;
   random_spanning_tree(g, gen, predecessor_map(pred));
   // write_spanning_tree(g, pred, constant_property_map<gt::edge_descriptor, double>(1.), "unweight_random_st.dot");
   random_spanning_tree(g, gen, predecessor_map(pred));


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