Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67967 - in branches/release: . boost boost/archive boost/bimap boost/config boost/detail boost/filesystem boost/functional/hash boost/fusion boost/fusion/container/list/detail boost/gil boost/graph boost/graph/detail boost/graph/distributed boost/graph/distributed/adjlist boost/graph/distributed/detail boost/graph/parallel boost/icl boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/iterator boost/math boost/msm boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/regex 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 doc libs libs/array/doc libs/array/test libs/bimap libs/config libs/date_time libs/filesystem libs/functional/hash libs/fusion libs/graph/src libs/graph_parallel libs/graph_parallel/src libs/icl libs/icl/doc libs/icl/doc/html/header/boost/icl libs/icl/test/test_doc_code_ libs/integer libs/interprocess libs/intrusive libs/iostreams libs/math libs/math/build libs/math/config libs/math/doc libs/math/doc/complex libs/math/doc/distexplorer libs/math/doc/gcd libs/math/doc/html libs/math/doc/octonion libs/math/doc/quaternion libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html/math_toolkit/main_overview libs/math/dot_net_example libs/math/example libs/math/minimax libs/math/performance libs/math/src libs/math/test libs/math/tools libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/python libs/regex libs/regex/build libs/serialization libs/serialization/doc libs/serialization/example libs/serialization/src libs/serialization/test libs/serialization/vc7ide 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/timer libs/tr1 libs/type_traits libs/typeof/doc libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more more/getting_started status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/regression tools/regression/src tools/release tools/wave
From: jewillco_at_[hidden]
Date: 2011-01-11 13:17:46


Author: jewillco
Date: 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
New Revision: 67967
URL: http://svn.boost.org/trac/boost/changeset/67967

Log:
Merged r67041,67084,67110,67705-67706,67722,67724,67764 (bug fixes) from trunk, plus allowed Boost.Filesystem v2 to be used in boost/distributed/adjlist/serialization.hpp
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/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/ (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/detail/endian.hpp (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (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/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/icl/ (props changed)
   branches/release/boost/integer/ (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/iterator_facade.hpp (props changed)
   branches/release/boost/math/ (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/msm/ (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/regex/ (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/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/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/array/doc/array.xml (props changed)
   branches/release/libs/array/test/Jamfile.v2 (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/config/ (props changed)
   branches/release/libs/date_time/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/fusion/ (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/header/boost/icl/ (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/iostreams/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/math/ (props changed)
   branches/release/libs/math/build/ (props changed)
   branches/release/libs/math/config/ (props changed)
   branches/release/libs/math/doc/ (props changed)
   branches/release/libs/math/doc/complex/ (props changed)
   branches/release/libs/math/doc/distexplorer/ (props changed)
   branches/release/libs/math/doc/gcd/ (props changed)
   branches/release/libs/math/doc/html/ (props changed)
   branches/release/libs/math/doc/octonion/ (props changed)
   branches/release/libs/math/doc/quaternion/ (props changed)
   branches/release/libs/math/doc/sf_and_dist/ (props changed)
   branches/release/libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/faq.html (props changed)
   branches/release/libs/math/dot_net_example/ (props changed)
   branches/release/libs/math/example/ (props changed)
   branches/release/libs/math/minimax/ (props changed)
   branches/release/libs/math/performance/ (props changed)
   branches/release/libs/math/src/ (props changed)
   branches/release/libs/math/test/ (props changed)
   branches/release/libs/math/tools/ (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/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/regex/ (props changed)
   branches/release/libs/regex/build/ (props changed)
   branches/release/libs/serialization/ (props changed)
   branches/release/libs/serialization/doc/ (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/serialization/vc7ide/ (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/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/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/more/getting_started/ (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/build/v2/user-config.jam (props changed)
   branches/release/tools/inspect/ (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/adjacency_matrix.hpp | 8 ++--
   branches/release/boost/graph/boykov_kolmogorov_max_flow.hpp | 48 ++++++++++++++++----------------
   branches/release/boost/graph/compressed_sparse_row_graph.hpp | 4 +-
   branches/release/boost/graph/detail/adjacency_list.hpp | 3 +
   branches/release/boost/graph/detail/compressed_sparse_row_struct.hpp | 8 ++--
   branches/release/boost/graph/detail/d_ary_heap.hpp | 4 +-
   branches/release/boost/graph/detail/histogram_sort.hpp | 6 ++-
   branches/release/boost/graph/dimacs.hpp | 15 +++++----
   branches/release/boost/graph/distributed/adjacency_list.hpp | 60 ++++++++++++++++++++--------------------
   branches/release/boost/graph/distributed/adjlist/serialization.hpp | 17 ++++++-----
   branches/release/boost/graph/distributed/betweenness_centrality.hpp | 3 +
   branches/release/boost/graph/distributed/boman_et_al_graph_coloring.hpp | 8 ++--
   branches/release/boost/graph/distributed/compressed_sparse_row_graph.hpp | 9 +++--
   branches/release/boost/graph/distributed/connected_components.hpp | 27 +++++++++--------
   branches/release/boost/graph/distributed/connected_components_parallel_search.hpp | 9 +++--
   branches/release/boost/graph/distributed/crauser_et_al_shortest_paths.hpp | 3 +
   branches/release/boost/graph/distributed/depth_first_search.hpp | 3 +
   branches/release/boost/graph/distributed/detail/mpi_process_group.ipp | 44 ++++++++++++++--------------
   branches/release/boost/graph/distributed/detail/remote_update_set.hpp | 6 ++--
   branches/release/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp | 3 +
   branches/release/boost/graph/distributed/hohberg_biconnected_components.hpp | 30 ++++++++++----------
   branches/release/boost/graph/distributed/named_graph.hpp | 7 ++--
   branches/release/boost/graph/distributed/page_rank.hpp | 7 ++--
   branches/release/boost/graph/distributed/rmat_graph_generator.hpp | 3 +
   branches/release/boost/graph/distributed/shuffled_distribution.hpp | 3 +
   branches/release/boost/graph/distributed/strong_components.hpp | 5 ++-
   branches/release/boost/graph/erdos_renyi_generator.hpp | 6 ++--
   branches/release/boost/graph/graph_stats.hpp | 3 +
   branches/release/boost/graph/graph_test.hpp | 2
   branches/release/boost/graph/graphviz.hpp | 3 +
   branches/release/boost/graph/gursoy_atun_layout.hpp | 3 +
   branches/release/boost/graph/kamada_kawai_spring_layout.hpp | 31 ++++++++++++++++----
   branches/release/boost/graph/loop_erased_random_walk.hpp | 6 ++--
   branches/release/boost/graph/mesh_graph_generator.hpp | 4 +-
   branches/release/boost/graph/minimum_degree_ordering.hpp | 4 +-
   branches/release/boost/graph/named_function_params.hpp | 18 +++++++----
   branches/release/boost/graph/one_bit_color_map.hpp | 7 ++--
   branches/release/boost/graph/parallel/distribution.hpp | 7 ++--
   branches/release/boost/graph/properties.hpp | 4 +-
   branches/release/boost/graph/push_relabel_max_flow.hpp | 8 ++--
   branches/release/boost/graph/random.hpp | 4 +-
   branches/release/boost/graph/random_spanning_tree.hpp | 5 ++-
   branches/release/boost/graph/rmat_graph_generator.hpp | 9 +++--
   branches/release/boost/graph/stoer_wagner_min_cut.hpp | 12 ++++----
   branches/release/boost/graph/subgraph.hpp | 18 ++++++-----
   branches/release/boost/graph/two_bit_color_map.hpp | 7 ++--
   branches/release/libs/graph/src/read_graphviz_new.cpp | 17 ++++++-----
   branches/release/libs/graph_parallel/src/mpi_process_group.cpp | 49 ++++++++++++++++----------------
   48 files changed, 310 insertions(+), 260 deletions(-)

Modified: branches/release/boost/graph/adjacency_matrix.hpp
==============================================================================
--- branches/release/boost/graph/adjacency_matrix.hpp (original)
+++ branches/release/boost/graph/adjacency_matrix.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -14,7 +14,7 @@
 #include <boost/config.hpp>
 #include <vector>
 #include <memory>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/limits.hpp>
 #include <boost/iterator.hpp>
 #include <boost/graph/graph_traits.hpp>
@@ -982,7 +982,7 @@
   inline typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
   add_vertex(adjacency_matrix<D,VP,EP,GP,A>& g) {
     // UNDER CONSTRUCTION
- assert(false);
+ BOOST_ASSERT(false);
     return *vertices(g).first;
   }
 
@@ -991,7 +991,7 @@
   inline typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
   add_vertex(const VP2& /*vp*/, adjacency_matrix<D,VP,EP,GP,A>& g) {
     // UNDER CONSTRUCTION
- assert(false);
+ BOOST_ASSERT(false);
     return *vertices(g).first;
   }
 
@@ -1001,7 +1001,7 @@
                 adjacency_matrix<D,VP,EP,GP,A>& /*g*/)
   {
     // UNDER CONSTRUCTION
- assert(false);
+ BOOST_ASSERT(false);
   }
 
   // O(V)

Modified: branches/release/boost/graph/boykov_kolmogorov_max_flow.hpp
==============================================================================
--- branches/release/boost/graph/boykov_kolmogorov_max_flow.hpp (original)
+++ branches/release/boost/graph/boykov_kolmogorov_max_flow.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -33,7 +33,7 @@
 #define BOOST_BOYKOV_KOLMOGOROV_MAX_FLOW_HPP
 
 #include <boost/config.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <vector>
 #include <list>
 #include <utility>
@@ -126,7 +126,7 @@
         edge_iterator ei, e_end;
         for(boost::tie(ei, e_end) = edges(m_g); ei != e_end; ++ei) {
           m_res_cap_map[*ei] = m_cap_map[*ei];
- assert(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly
+ BOOST_ASSERT(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly
         }
         //init the search trees with the two terminals
         set_tree(m_source, tColorTraits::black());
@@ -235,13 +235,13 @@
        * target(returnVal, m_g) is the beginning of the path found in the sink-tree
        */
       std::pair<edge_descriptor, bool> grow(){
- assert(m_orphans.empty());
+ BOOST_ASSERT(m_orphans.empty());
         vertex_descriptor current_node;
         while((current_node = get_next_active_node()) != graph_traits<Graph>::null_vertex()){ //if there is one
- assert(get_tree(current_node) != tColorTraits::gray() &&
- (has_parent(current_node) ||
- current_node == m_source ||
- current_node == m_sink));
+ BOOST_ASSERT(get_tree(current_node) != tColorTraits::gray() &&
+ (has_parent(current_node) ||
+ current_node == m_source ||
+ current_node == m_sink));
 
           if(get_tree(current_node) == tColorTraits::black()){
             //source tree growing
@@ -269,7 +269,7 @@
                     m_time_map[other_node] = m_time_map[current_node];
                   }
                 } else{
- assert(get_tree(other_node)==tColorTraits::white());
+ BOOST_ASSERT(get_tree(other_node)==tColorTraits::white());
                   //kewl, found a path from one to the other search tree, return
                   // the connecting edge in src->sink dir
                   return std::make_pair(out_edge, true);
@@ -278,7 +278,7 @@
             } //for all out-edges
           } //source-tree-growing
           else{
- assert(get_tree(current_node) == tColorTraits::white());
+ BOOST_ASSERT(get_tree(current_node) == tColorTraits::white());
             out_edge_iterator ei, e_end;
             if(current_node != m_last_grow_vertex){
               m_last_grow_vertex = current_node;
@@ -302,7 +302,7 @@
                     m_time_map[other_node] = m_time_map[current_node];
                   }
                 } else{
- assert(get_tree(other_node)==tColorTraits::black());
+ BOOST_ASSERT(get_tree(other_node)==tColorTraits::black());
                   //kewl, found a path from one to the other search tree,
                   // return the connecting edge in src->sink dir
                   return std::make_pair(in_edge, true);
@@ -332,16 +332,16 @@
        * and so we process the nearest verts to the terminals first
        */
       void augment(edge_descriptor e) {
- assert(get_tree(target(e, m_g)) == tColorTraits::white());
- assert(get_tree(source(e, m_g)) == tColorTraits::black());
- assert(m_orphans.empty());
+ BOOST_ASSERT(get_tree(target(e, m_g)) == tColorTraits::white());
+ BOOST_ASSERT(get_tree(source(e, m_g)) == tColorTraits::black());
+ BOOST_ASSERT(m_orphans.empty());
 
         const tEdgeVal bottleneck = find_bottleneck(e);
         //now we push the found flow through the path
         //for each edge we saturate we have to look for the verts that belong to that edge, one of them becomes an orphans
         //now process the connecting edge
         m_res_cap_map[e] -= bottleneck;
- assert(m_res_cap_map[e] >= 0);
+ BOOST_ASSERT(m_res_cap_map[e] >= 0);
         m_res_cap_map[m_rev_edge_map[e]] += bottleneck;
 
         //now we follow the path back to the source
@@ -349,7 +349,7 @@
         while(current_node != m_source){
           edge_descriptor pred = get_edge_to_parent(current_node);
           m_res_cap_map[pred] -= bottleneck;
- assert(m_res_cap_map[pred] >= 0);
+ BOOST_ASSERT(m_res_cap_map[pred] >= 0);
           m_res_cap_map[m_rev_edge_map[pred]] += bottleneck;
           if(m_res_cap_map[pred] == 0){
             set_no_parent(current_node);
@@ -362,7 +362,7 @@
         while(current_node != m_sink){
           edge_descriptor pred = get_edge_to_parent(current_node);
           m_res_cap_map[pred] -= bottleneck;
- assert(m_res_cap_map[pred] >= 0);
+ BOOST_ASSERT(m_res_cap_map[pred] >= 0);
           m_res_cap_map[m_rev_edge_map[pred]] += bottleneck;
           if(m_res_cap_map[pred] == 0){
             set_no_parent(current_node);
@@ -421,7 +421,7 @@
             out_edge_iterator ei, e_end;
             for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){
               const edge_descriptor in_edge = m_rev_edge_map[*ei];
- assert(target(in_edge, m_g) == current_node); //we should be the target of this edge
+ BOOST_ASSERT(target(in_edge, m_g) == current_node); //we should be the target of this edge
               if(m_res_cap_map[in_edge] > 0){
                 vertex_descriptor other_node = source(in_edge, m_g);
                 if(get_tree(other_node) == tColorTraits::black() && has_source_connect(other_node)){
@@ -458,7 +458,7 @@
           } //source-tree-adoption
           else{
             //now we should be in the sink-tree, check that...
- assert(get_tree(current_node) == tColorTraits::white());
+ BOOST_ASSERT(get_tree(current_node) == tColorTraits::white());
             out_edge_iterator ei, e_end;
             edge_descriptor new_parent_edge;
             tDistanceVal min_distance = (std::numeric_limits<tDistanceVal>::max)();
@@ -513,7 +513,7 @@
             m_active_nodes.pop();
             m_in_active_list_map[v] = false;
           } else{
- assert(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white());
+ BOOST_ASSERT(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white());
             return v;
           }
         }
@@ -523,7 +523,7 @@
        * adds v as an active vertex, but only if its not in the list already
        */
       inline void add_active_node(vertex_descriptor v){
- assert(get_tree(v) != tColorTraits::gray());
+ BOOST_ASSERT(get_tree(v) != tColorTraits::gray());
         if(m_in_active_list_map[v]){
           return;
         } else{
@@ -536,7 +536,7 @@
        * finish_node removes a node from the front of the active queue (its called in grow phase, if no more paths can be found using this node)
        */
       inline void finish_node(vertex_descriptor v){
- assert(m_active_nodes.front() == v);
+ BOOST_ASSERT(m_active_nodes.front() == v);
         m_active_nodes.pop();
         m_in_active_list_map[v] = false;
         m_last_grow_vertex = graph_traits<Graph>::null_vertex();
@@ -548,7 +548,7 @@
        * being no more active)
        */
       inline void remove_active_node(vertex_descriptor v){
- assert(!has_parent(v));
+ BOOST_ASSERT(!has_parent(v));
       }
 
       /**
@@ -585,7 +585,7 @@
        * sets edge to parent vertex of v;
        */
       inline void set_edge_to_parent(vertex_descriptor v, edge_descriptor f_edge_to_parent){
- assert(m_res_cap_map[f_edge_to_parent] > 0);
+ BOOST_ASSERT(m_res_cap_map[f_edge_to_parent] > 0);
         m_pre_map[v] = f_edge_to_parent;
         m_has_parent_map[v] = true;
       }
@@ -750,7 +750,7 @@
   function_requires<Mutable_LvaluePropertyMapConcept<ColorMap, vertex_descriptor> >(); //write corresponding tree
   function_requires<Mutable_LvaluePropertyMapConcept<DistanceMap, vertex_descriptor> >(); //write distance to source/sink
   function_requires<ReadablePropertyMapConcept<IndexMap, vertex_descriptor> >(); //get index 0...|V|-1
- assert(num_vertices(g) >= 2 && src != sink);
+ BOOST_ASSERT(num_vertices(g) >= 2 && src != sink);
 
   detail::bk_max_flow<
     Graph, CapacityEdgeMap, ResidualCapacityEdgeMap, ReverseEdgeMap,

Modified: branches/release/boost/graph/compressed_sparse_row_graph.hpp
==============================================================================
--- branches/release/boost/graph/compressed_sparse_row_graph.hpp (original)
+++ branches/release/boost/graph/compressed_sparse_row_graph.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,7 +17,7 @@
 #include <utility>
 #include <algorithm>
 #include <climits>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <iterator>
 #if 0
 #include <iostream> // For some debugging code below
@@ -1342,7 +1342,7 @@
 edge_from_index(EdgeIndex idx, const BOOST_CSR_GRAPH_TYPE& g)
 {
   typedef typename std::vector<EdgeIndex>::const_iterator row_start_iter;
- assert (idx < num_edges(g));
+ BOOST_ASSERT (idx < num_edges(g));
   row_start_iter src_plus_1 =
     std::upper_bound(g.m_forward.m_rowstart.begin(),
                      g.m_forward.m_rowstart.end(),

Modified: branches/release/boost/graph/detail/adjacency_list.hpp
==============================================================================
--- branches/release/boost/graph/detail/adjacency_list.hpp (original)
+++ branches/release/boost/graph/detail/adjacency_list.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -35,6 +35,7 @@
 #include <boost/pending/property.hpp>
 #include <boost/graph/adjacency_iterator.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
 
 // Symbol truncation problems with MSVC, trying to shorten names.
 #define stored_edge se_
@@ -1216,7 +1217,7 @@
         std::pair<out_edge_iterator, out_edge_iterator> rng =
           get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0));
         rng.first = std::find(rng.first, rng.second, e);
- assert(rng.first != rng.second);
+ BOOST_ASSERT(rng.first != rng.second);
         remove_edge(rng.first);
       }
 

Modified: branches/release/boost/graph/detail/compressed_sparse_row_struct.hpp
==============================================================================
--- branches/release/boost/graph/detail/compressed_sparse_row_struct.hpp (original)
+++ branches/release/boost/graph/detail/compressed_sparse_row_struct.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -21,7 +21,7 @@
 #include <utility>
 #include <algorithm>
 #include <climits>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <iterator>
 #if 0
 #include <iostream> // For some debugging code below
@@ -255,7 +255,7 @@
                                            std::vector<vertex_descriptor>& targets,
                                            vertices_size_type numverts,
                                            GlobalToLocal global_to_local) {
- assert (sources.size() == targets.size());
+ BOOST_ASSERT (sources.size() == targets.size());
       // Do an in-place histogram sort (at least that's what I think it is) to
       // sort sources and targets
       m_rowstart.clear();
@@ -281,8 +281,8 @@
                                            std::vector<typename inherited_edge_properties::edge_bundled>& edge_props,
                                            vertices_size_type numverts,
                                            GlobalToLocal global_to_local) {
- assert (sources.size() == targets.size());
- assert (sources.size() == edge_props.size());
+ BOOST_ASSERT (sources.size() == targets.size());
+ BOOST_ASSERT (sources.size() == edge_props.size());
       // Do an in-place histogram sort (at least that's what I think it is) to
       // sort sources and targets
       m_rowstart.clear();

Modified: branches/release/boost/graph/detail/d_ary_heap.hpp
==============================================================================
--- branches/release/boost/graph/detail/d_ary_heap.hpp (original)
+++ branches/release/boost/graph/detail/d_ary_heap.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -15,7 +15,7 @@
 #include <cstddef>
 #include <algorithm>
 #include <utility>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/property_map/property_map.hpp>
@@ -213,7 +213,7 @@
 #if 0
       for (size_t i = 1; i < data.size(); ++i) {
         if (compare_indirect(data[i], data[parent(i)])) {
- assert (!"Element is smaller than its parent");
+ BOOST_ASSERT (!"Element is smaller than its parent");
         }
       }
 #endif

Modified: branches/release/boost/graph/detail/histogram_sort.hpp
==============================================================================
--- branches/release/boost/graph/detail/histogram_sort.hpp (original)
+++ branches/release/boost/graph/detail/histogram_sort.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -10,6 +10,8 @@
 #ifndef BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP
 #define BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP
 
+#include <boost/assert.hpp>
+
 namespace boost {
   namespace graph {
     namespace detail {
@@ -165,7 +167,7 @@
     while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) {
       // Add a slot in the right bucket
       size_t target_pos = insert_positions[key_transform(key_begin[i])]++;
- assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]);
+ BOOST_ASSERT (target_pos < rowstart[key_transform(key_begin[i]) + 1]);
       if (target_pos == i) continue;
       // Swap this edge into place
       using std::swap;
@@ -199,7 +201,7 @@
     while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) {
       // Add a slot in the right bucket
       size_t target_pos = insert_positions[key_transform(key_begin[i])]++;
- assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]);
+ BOOST_ASSERT (target_pos < rowstart[key_transform(key_begin[i]) + 1]);
       if (target_pos == i) continue;
       // Swap this edge into place
       using std::swap;

Modified: branches/release/boost/graph/dimacs.hpp
==============================================================================
--- branches/release/boost/graph/dimacs.hpp (original)
+++ branches/release/boost/graph/dimacs.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,6 +17,7 @@
 #include <exception>
 #include <vector>
 #include <queue>
+#include <boost/assert.hpp>
 
 namespace boost { namespace graph {
 
@@ -54,27 +55,27 @@
                           num_edges( 0 ), seen_edges( 0 ), want_weights(false) {}
 
   edge_type edge_deref() {
- assert( !read_edges.empty() );
+ BOOST_ASSERT( !read_edges.empty() );
     return read_edges.front();
    }
 
   inline edge_type* edge_ref() {
- assert( !read_edges.empty() );
+ BOOST_ASSERT( !read_edges.empty() );
     return &read_edges.front();
   }
 
   inline edge_weight_type edge_weight_deref() {
- assert( !read_edge_weights.empty() );
+ BOOST_ASSERT( !read_edge_weights.empty() );
     return read_edge_weights.front();
   }
 
   inline dimacs_basic_reader incr( incr_mode mode ) {
     if( mode == edge ) {
- assert( !read_edges.empty() );
+ BOOST_ASSERT( !read_edges.empty() );
       read_edges.pop();
     }
     else if( mode == edge_weight ) {
- assert( !read_edge_weights.empty() );
+ BOOST_ASSERT( !read_edge_weights.empty() );
       read_edge_weights.pop();
     }
 
@@ -100,8 +101,8 @@
               read_edge_weights.push( weight );
           }
       }
- assert( read_edges.size() < 100 );
- assert( read_edge_weights.size() < 100 );
+ BOOST_ASSERT( read_edges.size() < 100 );
+ BOOST_ASSERT( read_edge_weights.size() < 100 );
     }
 
     // the 1000000 just happens to be about how many edges can be read in

Modified: branches/release/boost/graph/distributed/adjacency_list.hpp
==============================================================================
--- branches/release/boost/graph/distributed/adjacency_list.hpp (original)
+++ branches/release/boost/graph/distributed/adjacency_list.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -28,7 +28,7 @@
 #include <boost/graph/parallel/detail/property_holders.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/type_traits/is_same.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <list>
 #include <algorithm>
 #include <boost/limits.hpp>
@@ -966,7 +966,7 @@
              && i->e == e.local)
         ++i;
 
- assert(i != in_edges.end());
+ BOOST_ASSERT(i != in_edges.end());
       in_edges.erase(i);
     }
 
@@ -1692,25 +1692,25 @@
     // Directly access a vertex or edge bundle
     vertex_bundled& operator[](vertex_descriptor v)
     {
- assert(v.owner == processor());
+ BOOST_ASSERT(v.owner == processor());
       return base()[v.local];
     }
     
     const vertex_bundled& operator[](vertex_descriptor v) const
     {
- assert(v.owner == processor());
+ BOOST_ASSERT(v.owner == processor());
       return base()[v.local];
     }
     
     edge_bundled& operator[](edge_descriptor e)
     {
- assert(e.owner() == processor());
+ BOOST_ASSERT(e.owner() == processor());
       return base()[e.local];
     }
     
     const edge_bundled& operator[](edge_descriptor e) const
     {
- assert(e.owner() == processor());
+ BOOST_ASSERT(e.owner() == processor());
       return base()[e.local];
     }
 
@@ -2078,7 +2078,7 @@
         detail::parallel::add_local_edge(target(data.e, base()),
                        source(data.e, base()),
                        build_edge_property(data.get_property()), base());
- assert(edge.second);
+ BOOST_ASSERT(edge.second);
       put(edge_target_processor_id, base(), edge.first, other_proc);
 
       if (edge.second && on_add_edge)
@@ -2119,7 +2119,7 @@
 
         remove_local_edge_from_list(src, tgt, undirectedS());
       } else {
- assert(tgt.owner == process_id(process_group_));
+ BOOST_ASSERT(tgt.owner == process_id(process_group_));
         in_edge_list_type& in_edges =
           get(vertex_in_edges, base())[tgt.local];
         typename in_edge_list_type::iterator ei;
@@ -2287,7 +2287,7 @@
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property::
   commit() const
   {
- assert(!this->committed);
+ BOOST_ASSERT(!this->committed);
     this->committed = true;
 
     process_id_type owner
@@ -2391,7 +2391,7 @@
   std::pair<typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor, bool>
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge::commit() const
   {
- assert(!committed);
+ BOOST_ASSERT(!committed);
     committed = true;
 
     if (source.owner == self.processor())
@@ -2583,7 +2583,7 @@
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property::
   commit() const
   {
- assert(!this->committed);
+ BOOST_ASSERT(!this->committed);
     this->committed = true;
 
     if (this->source.owner == this->self.processor())
@@ -2683,7 +2683,7 @@
   out_edges(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE impl;
     typedef typename impl::out_edge_generator generator;
@@ -2705,7 +2705,7 @@
   out_degree(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v,
              const PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return out_degree(v.local, g.base());
   }
@@ -2727,7 +2727,7 @@
                          ::vertex_descriptor v,
            const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) impl;
     typedef typename impl::inherited base_graph_type;
@@ -2755,7 +2755,7 @@
                          ::vertex_descriptor v,
            const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) impl;
     typedef typename impl::in_edge_generator generator;
@@ -2778,7 +2778,7 @@
                            ::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return get(vertex_in_edges, g.base())[v.local].size();
   }
@@ -2792,7 +2792,7 @@
                            ::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return out_degree(v.local, g.base());
   }
@@ -2809,7 +2809,7 @@
                          ::vertex_descriptor v,
          const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
     return out_degree(v.local, g.base());
   }
 
@@ -2823,7 +2823,7 @@
                          ::vertex_descriptor v,
          const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
     return out_degree(v, g) + in_degree(v, g);
   }
 
@@ -2893,7 +2893,7 @@
                        ::edge_descriptor edge_descriptor;
 
     // For directed graphs, u must be local
- assert(u.owner == process_id(g.process_group()));
+ BOOST_ASSERT(u.owner == process_id(g.process_group()));
 
     typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)
         ::out_edge_iterator ei, ei_end;
@@ -2930,7 +2930,7 @@
       }
       return std::make_pair(edge_descriptor(), false);
     } else {
- assert(false);
+ BOOST_ASSERT(false);
       exit(1);
     }
   }
@@ -2997,8 +2997,8 @@
   remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor e,
               PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(source(e, g).owner == g.processor()
- || target(e, g).owner == g.processor());
+ BOOST_ASSERT(source(e, g).owner == g.processor()
+ || target(e, g).owner == g.processor());
 
     if (target(e, g).owner == g.processor())
       detail::parallel::remove_in_edge(e, g, DirectedS());
@@ -3042,7 +3042,7 @@
                 ::out_edge_iterator ei,
               PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g)
   {
- assert(source(*ei, g).owner == g.processor());
+ BOOST_ASSERT(source(*ei, g).owner == g.processor());
     remove_edge(ei->local, g.base());
   }
 
@@ -3108,7 +3108,7 @@
     typedef parallel::detail::remove_out_edge_predicate<Graph, Predicate>
       Pred;
 
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     remove_out_edge_if(u.local, Pred(g, predicate), g.base());
   }
 
@@ -3169,7 +3169,7 @@
     typedef parallel::detail::remove_in_edge_predicate<Graph, Predicate>
       Pred;
 
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     graph_detail::erase_if(get(vertex_in_edges, g.base())[u.local],
                            Pred(g, predicate));
   }
@@ -3336,7 +3336,7 @@
     (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor u,
       PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g)
   {
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     clear_out_edges(u.local, g.base());
   }
 
@@ -3401,7 +3401,7 @@
   {
     typedef typename PBGL_DISTRIB_ADJLIST_TYPE::graph_type graph_type;
     typedef typename graph_type::named_graph_mixin named_graph_mixin;
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     static_cast<named_graph_mixin&>(static_cast<graph_type&>(g))
       .removing_vertex(u);
     g.distribution().clear();
@@ -3655,7 +3655,7 @@
     if (owner(key) == process_id(g.process_group()))
       return get(p, g.base(), local(key));
     else
- assert(false);
+ BOOST_ASSERT(false);
   }
 
   template<typename Property, PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS,
@@ -3666,7 +3666,7 @@
     if (owner(key) == process_id(g.process_group()))
       put(p, g.base(), local(key), v);
     else
- assert(false);
+ BOOST_ASSERT(false);
   }
 
   template<PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS>

Modified: branches/release/boost/graph/distributed/adjlist/serialization.hpp
==============================================================================
--- branches/release/boost/graph/distributed/adjlist/serialization.hpp (original)
+++ branches/release/boost/graph/distributed/adjlist/serialization.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -9,6 +9,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+# include <boost/assert.hpp>
 # include <boost/lexical_cast.hpp>
 # include <boost/foreach.hpp>
 # include <boost/filesystem/path.hpp>
@@ -93,10 +94,10 @@
               if (!filesystem::is_regular(*i))
                   boost::throw_exception(std::runtime_error("directory contains non-regular entries"));
 
-#if BOOST_VERSION >= 103600
- std::string process_name = i->path().filename();
+#if BOOST_FILESYSTEM_VERSION == 3
+ std::string process_name = i->path().filename().string();
 #else
- std::string process_name = i->leaf();
+ std::string process_name = i->path().filename();
 #endif
               for (std::string::size_type i = 0; i < process_name.size(); ++i)
                 if (!is_digit(process_name[i]))
@@ -305,7 +306,7 @@
           if (is_root())
               std::cout << i << " used to be " << old_ids[i] << "\n";
 # endif
- assert(m_id_mapping[old_ids[i]] == -1);
+ BOOST_ASSERT(m_id_mapping[old_ids[i]] == -1);
           m_id_mapping[old_ids[i]] = i;
       }
 
@@ -513,7 +514,7 @@
           detail::parallel::add_local_edge(
               local(u), local(v)
             , m_g.build_edge_property(property), m_g.base());
- assert(inserted.second);
+ BOOST_ASSERT(inserted.second);
       put(edge_target_processor_id, m_g.base(), inserted.first, owner(v));
 
       edge_descriptor e(owner(u), owner(v), true, inserted.first);
@@ -617,7 +618,7 @@
       boost::parallel::inplace_all_to_all(m_pg, m_remote_vertices);
 
       for (int i = 0; i < num_processes(m_pg); ++i)
- assert(m_remote_vertices[i].size() == m_requested_vertices[i].size());
+ BOOST_ASSERT(m_remote_vertices[i].size() == m_requested_vertices[i].size());
   }
 
   template <class Graph, class Archive, class VertexListS>
@@ -667,7 +668,7 @@
           if (i == m_property_ptrs[owner(u)].end()
               || i->first != e.property_ptr)
           {
- assert(false);
+ BOOST_ASSERT(false);
           }
 
           local_edge_descriptor local_edge(local(u), local(v), i->second);
@@ -698,7 +699,7 @@
       if (i == m_requested_vertices[owner(u)].end()
           || *i != local(u))
       {
- assert(false);
+ BOOST_ASSERT(false);
       }
 
       local_vertex_descriptor local =

Modified: branches/release/boost/graph/distributed/betweenness_centrality.hpp
==============================================================================
--- branches/release/boost/graph/distributed/betweenness_centrality.hpp (original)
+++ branches/release/boost/graph/distributed/betweenness_centrality.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -20,6 +20,7 @@
 #include <boost/graph/distributed/concepts.hpp>
 #include <boost/graph/graph_traits.hpp>
 #include <boost/config.hpp>
+#include <boost/assert.hpp>
 
 // For additive_reducer
 #include <boost/graph/distributed/distributed_graph_utility.hpp>
@@ -929,7 +930,7 @@
         for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) {
           vertex_descriptor v = *vw;
 
- assert(get(path_count, w) != 0);
+ BOOST_ASSERT(get(path_count, w) != 0);
 
           dependency_type factor = dependency_type(get(path_count, v))
             / dependency_type(get(path_count, w));

Modified: branches/release/boost/graph/distributed/boman_et_al_graph_coloring.hpp
==============================================================================
--- branches/release/boost/graph/distributed/boman_et_al_graph_coloring.hpp (original)
+++ branches/release/boost/graph/distributed/boman_et_al_graph_coloring.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -22,7 +22,7 @@
 #include <utility>
 #include <boost/graph/iteration_macros.hpp>
 #include <boost/optional.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/container_traits.hpp>
 #include <boost/graph/properties.hpp>
 
@@ -220,7 +220,7 @@
 
         // Receive boundary colors from other processors
         while (optional<std::pair<process_id_type, int> > stp = probe(pg)) {
- assert(stp->second == 17);
+ BOOST_ASSERT(stp->second == 17);
           message_type msg;
           receive(pg, stp->first, stp->second, msg);
           cache(color, msg.first, msg.second);
@@ -279,7 +279,7 @@
 
     // Receive boundary colors from other processors
     while (optional<std::pair<process_id_type, int> > stp = probe(pg)) {
- assert(stp->second == 17);
+ BOOST_ASSERT(stp->second == 17);
       message_type msg;
       receive(pg, stp->first, stp->second, msg);
       cache(color, msg.first, msg.second);
@@ -298,7 +298,7 @@
   color_type num_colors = 0;
   BGL_FORALL_VERTICES_T(v, g, DistributedGraph) {
     color_type k = get(color, v);
- assert(k != no_color);
+ BOOST_ASSERT(k != no_color);
     if (k != no_color) {
       if (k >= (color_type)marked.size()) marked.resize(k + 1, 0); // TBD: perf?
       if (marked[k] != iter_num) {

Modified: branches/release/boost/graph/distributed/compressed_sparse_row_graph.hpp
==============================================================================
--- branches/release/boost/graph/distributed/compressed_sparse_row_graph.hpp (original)
+++ branches/release/boost/graph/distributed/compressed_sparse_row_graph.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,6 +17,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/compressed_sparse_row_graph.hpp>
 #include <boost/graph/distributed/selector.hpp>
 #include <boost/mpl/if.hpp>
@@ -366,7 +367,7 @@
   {
     std::pair<process_id_type, vertex_descriptor> locator
       = get(vertex_global, *this, v);
- assert(locator.first == process_id(m_process_group));
+ BOOST_ASSERT(locator.first == process_id(m_process_group));
     return base().m_vertex_properties[locator.second];
   }
 
@@ -374,19 +375,19 @@
   {
     std::pair<process_id_type, vertex_descriptor> locator
       = get(vertex_global, *this, v);
- assert(locator.first == process_id(m_process_group));
+ BOOST_ASSERT(locator.first == process_id(m_process_group));
     return base().m_process_group[locator.second];
   }
 
   edge_bundled& operator[](edge_descriptor e)
   {
- assert(get(vertex_owner, *this, e.src) == process_id(m_process_group));
+ BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
     return base().m_edge_properties[e.idx];
   }
 
   const edge_bundled& operator[](edge_descriptor e) const
   {
- assert(get(vertex_owner, *this, e.src) == process_id(m_process_group));
+ BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
     return base().m_edge_properties[e.idx];
   }
 

Modified: branches/release/boost/graph/distributed/connected_components.hpp
==============================================================================
--- branches/release/boost/graph/distributed/connected_components.hpp (original)
+++ branches/release/boost/graph/distributed/connected_components.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
@@ -116,7 +117,7 @@
 
         // Receive remote roots and edges
         while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == root_adj_msg);
+ BOOST_ASSERT(m->second == root_adj_msg);
 
           std::vector<vertex_descriptor> adjs;
           receive(pg, m->first, m->second, adjs);
@@ -554,12 +555,12 @@
                                adj[*liter].begin(), adj[*liter].end() );
 #ifdef PBGL_IN_PLACE_MERGE
 #ifdef PBGL_SORT_ASSERT
- assert(__gnu_cxx::is_sorted(my_adj.begin(),
- my_adj.end() - adj[*liter].size(),
- std::less<vertex_descriptor>()));
- assert(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(),
- my_adj.end(),
- std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(),
+ my_adj.end() - adj[*liter].size(),
+ std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(),
+ my_adj.end(),
+ std::less<vertex_descriptor>()));
 #endif
                 std::inplace_merge(my_adj.begin(),
                                    my_adj.end() - adj[*liter].size(),
@@ -602,12 +603,12 @@
 #ifdef PBGL_IN_PLACE_MERGE
             std::size_t num_incoming_edges = incoming_edges.size();
 #ifdef PBGL_SORT_ASSERT
- assert(__gnu_cxx::is_sorted(my_adj.begin(),
- my_adj.end() - (num_incoming_edges-1),
- std::less<vertex_descriptor>()));
- assert(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1),
- my_adj.end(),
- std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(),
+ my_adj.end() - (num_incoming_edges-1),
+ std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1),
+ my_adj.end(),
+ std::less<vertex_descriptor>()));
 #endif
             std::inplace_merge(my_adj.begin(),
                                my_adj.end() - (num_incoming_edges - 1),

Modified: branches/release/boost/graph/distributed/connected_components_parallel_search.hpp
==============================================================================
--- branches/release/boost/graph/distributed/connected_components_parallel_search.hpp (original)
+++ branches/release/boost/graph/distributed/connected_components_parallel_search.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <boost/pending/indirect_cmp.hpp>
@@ -111,7 +112,7 @@
       // a mapping for that component number (which would be bad)
       void add(const component_value_type &a)
       {
- assert(collisions.count(a) == 0);
+ BOOST_ASSERT(collisions.count(a) == 0);
         collisions[a] = a;
       }
 
@@ -147,8 +148,8 @@
       // Used to resolve mapping at end of run.
       component_value_type update(component_value_type a)
       {
- assert(num_unique > 0);
- assert(collisions.count(a) != 0);
+ BOOST_ASSERT(num_unique > 0);
+ BOOST_ASSERT(collisions.count(a) != 0);
         return collisions[a];
       }
 
@@ -174,7 +175,7 @@
       // components in the graph.
       int unique(void)
       {
- assert(num_unique > 0);
+ BOOST_ASSERT(num_unique > 0);
         return num_unique;
       }
 

Modified: branches/release/boost/graph/distributed/crauser_et_al_shortest_paths.hpp
==============================================================================
--- branches/release/boost/graph/distributed/crauser_et_al_shortest_paths.hpp (original)
+++ branches/release/boost/graph/distributed/crauser_et_al_shortest_paths.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -30,6 +30,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/distributed/detail/dijkstra_shortest_paths.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <functional>
@@ -330,7 +331,7 @@
         crauser_et_al_shortest_paths_stats.deleted_vertices.push_back(deletions);
       }
       local_deletions = 0;
- assert(deletions > 0);
+ BOOST_ASSERT(deletions > 0);
 #endif
 
       return min_distance == (std::numeric_limits<distance_type>::max)();

Modified: branches/release/boost/graph/distributed/depth_first_search.hpp
==============================================================================
--- branches/release/boost/graph/distributed/depth_first_search.hpp (original)
+++ branches/release/boost/graph/distributed/depth_first_search.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -19,6 +19,7 @@
 #include <boost/graph/properties.hpp>
 #include <boost/graph/distributed/concepts.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/process_group.hpp>
 #include <boost/graph/parallel/container_traits.hpp>
 
@@ -163,7 +164,7 @@
             break;
 
           default:
- assert(false);
+ BOOST_ASSERT(false);
           }
         }
       }

Modified: branches/release/boost/graph/distributed/detail/mpi_process_group.ipp
==============================================================================
--- branches/release/boost/graph/distributed/detail/mpi_process_group.ipp (original)
+++ branches/release/boost/graph/distributed/detail/mpi_process_group.ipp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -18,7 +18,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
-#include <cassert>
+#include <boost/assert.hpp>
 #include <algorithm>
 #include <boost/graph/parallel/detail/untracked_pair.hpp>
 #include <numeric>
@@ -166,7 +166,7 @@
 mpi_process_group::send_impl(int dest, int tag, const T& value,
                              mpl::true_ /*is_mpi_datatype*/) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -197,7 +197,7 @@
 mpi_process_group::send_impl(int dest, int tag, const T& value,
                              mpl::false_ /*is_mpi_datatype*/) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -246,7 +246,7 @@
 mpi_process_group::
 array_send_impl(int dest, int tag, const T values[], std::size_t n) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -454,7 +454,7 @@
 template<typename Type, typename Handler>
 void mpi_process_group::trigger(int tag, const Handler& handler)
 {
- assert(block_num);
+ BOOST_ASSERT(block_num);
   install_trigger(tag,my_block_number(),shared_ptr<trigger_base>(
     new trigger_launcher<Type, Handler>(*this, tag, handler)));
 }
@@ -462,7 +462,7 @@
 template<typename Type, typename Handler>
 void mpi_process_group::trigger_with_reply(int tag, const Handler& handler)
 {
- assert(block_num);
+ BOOST_ASSERT(block_num);
   install_trigger(tag,my_block_number(),shared_ptr<trigger_base>(
     new reply_trigger_launcher<Type, Handler>(*this, tag, handler)));
 }
@@ -570,7 +570,7 @@
             << " receive from source " << source << " and tag " << tag
         << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl;
 #endif
- assert(context == trc_out_of_band);
+ BOOST_ASSERT(context == trc_out_of_band);
 
   boost::parallel::detail::untracked_pair<int, Type> data;
 
@@ -631,7 +631,7 @@
   if (context == trc_out_of_band) {
     return;
   }
- assert (context == trc_irecv_out_of_band);
+ BOOST_ASSERT (context == trc_irecv_out_of_band);
 
   // force posting of new MPI_Irecv, even though buffer is already allocated
   boost::mpi::packed_iarchive ia(self.impl_->comm,self.impl_->buffers[tag]);
@@ -656,7 +656,7 @@
     self.impl_->buffers[tag].resize(buffer_size);
     force = true;
   }
- assert(static_cast<int>(self.impl_->buffers[tag].size()) >= buffer_size);
+ BOOST_ASSERT(static_cast<int>(self.impl_->buffers[tag].size()) >= buffer_size);
   
   //BOOST_MPL_ASSERT(mpl::not_<is_mpi_datatype<Type> >);
   if (force) {
@@ -677,7 +677,7 @@
                         value, boost::mpi::is_mpi_datatype<T>()))
       return source;
   }
- assert (false);
+ BOOST_ASSERT (false);
 }
 
 template<typename T>
@@ -694,7 +694,7 @@
     if (result)
       return std::make_pair(source, n);
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename T>
@@ -708,7 +708,7 @@
                               values, n))
       return std::make_pair(source, n);
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename T>
@@ -724,7 +724,7 @@
             "Process %d failed to receive a message from process %d with tag %d in block %d.\n",
             process_id(pg), source, tag, pg.my_block_number());
 
- assert(false);
+ BOOST_ASSERT(false);
     exit(1);
   }
 }
@@ -745,7 +745,7 @@
             "Process %d failed to receive a message from process %d with tag %d in block %d.\n",
             process_id(pg), source, tag, pg.my_block_number());
 
- assert(false);
+ BOOST_ASSERT(false);
     exit(1);
   }
 }
@@ -837,7 +837,7 @@
   int result = MPI_Allgather(&size, 1, MPI_INT,
                              &sizes[0], 1, MPI_INT,
                              communicator(pg));
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   // Adjust sizes based on the number of bytes
   std::transform(sizes.begin(), sizes.end(), sizes.begin(),
@@ -860,7 +860,7 @@
                             &out[0], &sizes[0], &displacements[0], MPI_BYTE,
                             communicator(pg));
   }
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 }
 
 template<typename InputIterator>
@@ -878,25 +878,25 @@
 
   MPI_Group current_group;
   int result = MPI_Comm_group(communicator(pg), &current_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   MPI_Group new_group;
   result = MPI_Group_incl(current_group, ranks.size(), &ranks[0], &new_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   MPI_Comm new_comm;
   result = MPI_Comm_create(communicator(pg), new_group, &new_comm);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   result = MPI_Group_free(&new_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
   result = MPI_Group_free(&current_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   if (new_comm != MPI_COMM_NULL) {
     mpi_process_group result_pg(boost::mpi::communicator(new_comm,boost::mpi::comm_attach));
     result = MPI_Comm_free(&new_comm);
- assert(result == 0);
+ BOOST_ASSERT(result == 0);
     return result_pg;
   } else {
     return mpi_process_group(mpi_process_group::create_empty());

Modified: branches/release/boost/graph/distributed/detail/remote_update_set.hpp
==============================================================================
--- branches/release/boost/graph/distributed/detail/remote_update_set.hpp (original)
+++ branches/release/boost/graph/distributed/detail/remote_update_set.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -16,7 +16,7 @@
 #include <boost/graph/parallel/process_group.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <vector>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/optional.hpp>
 #include <queue>
 
@@ -110,7 +110,7 @@
       case msg_updates:
         {
           updates_size_type num_updates = update_sizes[source];
- assert(num_updates);
+ BOOST_ASSERT(num_updates);
 
           // Receive the actual updates
           std::vector<updates_pair_type> updates(num_updates);
@@ -207,7 +207,7 @@
     void operator()(process_id_type source, int tag)
     {
       // Receive the # of updates
- assert(tag == msg_update);
+ BOOST_ASSERT(tag == msg_update);
       update_pair_type update;
       receive(self->process_group, source, tag, update);
       

Modified: branches/release/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp
==============================================================================
--- branches/release/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp (original)
+++ branches/release/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -22,6 +22,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/distributed/detail/dijkstra_shortest_paths.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
 #include <boost/pending/indirect_cmp.hpp>
@@ -284,7 +285,7 @@
         eager_dijkstra_shortest_paths_stats.deleted_vertices
           .push_back(deletions);
       local_deletions = 0;
- assert(deletions > 0);
+ BOOST_ASSERT(deletions > 0);
 #endif
 
       return min_distance == (std::numeric_limits<distance_type>::max)();

Modified: branches/release/boost/graph/distributed/hohberg_biconnected_components.hpp
==============================================================================
--- branches/release/boost/graph/distributed/hohberg_biconnected_components.hpp (original)
+++ branches/release/boost/graph/distributed/hohberg_biconnected_components.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -39,7 +39,7 @@
 #include <boost/graph/iteration_macros.hpp>
 #include <boost/optional.hpp>
 #include <utility> // for std::pair
-#include <cassert>
+#include <boost/assert.hpp>
 #include <algorithm> // for std::find, std::mismatch
 #include <vector>
 #include <boost/graph/parallel/algorithm.hpp>
@@ -136,9 +136,9 @@
   template<typename T>
   T branch_point(const std::vector<T>& p1, const std::vector<T>& p2)
   {
- assert(!p1.empty());
- assert(!p2.empty());
- assert(p1.front() == p2.front());
+ BOOST_ASSERT(!p1.empty());
+ BOOST_ASSERT(!p2.empty());
+ BOOST_ASSERT(p1.front() == p2.front());
 
     typedef typename std::vector<T>::const_iterator iterator;
 
@@ -385,7 +385,7 @@
   template<typename Archiver>
   void serialize(Archiver&, const unsigned int /*version*/)
   {
- assert(false);
+ BOOST_ASSERT(false);
   }
 };
 
@@ -523,7 +523,7 @@
 
   default:
 // std::cerr << "Phase is " << int(phase) << "\n";
- assert(false);
+ BOOST_ASSERT(false);
   }
 }
 
@@ -579,7 +579,7 @@
     break;
 
   default:
- assert(false);
+ BOOST_ASSERT(false);
   }
 }
 
@@ -596,7 +596,7 @@
             << name << "), phase = " << (int)phase << std::endl;
 #endif
 
- assert(phase == 4);
+ BOOST_ASSERT(phase == 4);
 
   typename property_map<Graph, vertex_owner_t>::const_type
     owner = get(vertex_owner, g);
@@ -684,7 +684,7 @@
 {
   using namespace hohberg_detail;
 
- assert(phase == 4);
+ BOOST_ASSERT(phase == 4);
 
   typename property_map<Graph, vertex_owner_t>::const_type
     owner = get(vertex_owner, g);
@@ -870,7 +870,7 @@
     if (source(e, g) == target(oe, g)) return result;
     ++result;
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename Graph>
@@ -883,7 +883,7 @@
     if (target(e, g) == v) return result;
     ++result;
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename Graph, typename InputIterator, typename ComponentMap,
@@ -952,7 +952,7 @@
           // Receive the path header
           path_header<edge_descriptor> header;
           receive(pg, msg->first, msg->second, header);
- assert(path_length == header.path_length);
+ BOOST_ASSERT(path_length == header.path_length);
 
           // Receive the path itself
           path_t path(path_length);
@@ -966,7 +966,7 @@
       case msg_path_vertices:
         // Should be handled in msg_path_header case, unless we're going
         // stateless.
- assert(false);
+ BOOST_ASSERT(false);
         break;
 
       case msg_tree_header:
@@ -989,7 +989,7 @@
       case msg_tree_vertices:
         // Should be handled in msg_tree_header case, unless we're
         // going stateless.
- assert(false);
+ BOOST_ASSERT(false);
         break;
 
       case msg_name:
@@ -1002,7 +1002,7 @@
         break;
 
       default:
- assert(false);
+ BOOST_ASSERT(false);
       }
     }
     ++path_length;

Modified: branches/release/boost/graph/distributed/named_graph.hpp
==============================================================================
--- branches/release/boost/graph/distributed/named_graph.hpp (original)
+++ branches/release/boost/graph/distributed/named_graph.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/named_graph.hpp>
 #include <boost/functional/hash.hpp>
 #include <boost/variant.hpp>
@@ -393,7 +394,7 @@
 BGL_NAMED_GRAPH::lazy_add_vertex::commit() const
 {
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
- assert (!committed);
+ BOOST_ASSERT (!committed);
   committed = true;
 
   process_id_type owner = self.named_distribution()(name);
@@ -530,7 +531,7 @@
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
   using boost::parallel::detail::make_untracked_pair;
 
- assert(!committed);
+ BOOST_ASSERT(!committed);
   committed = true;
 
   /// The result we will return, if we are sending a message to
@@ -729,7 +730,7 @@
 {
   using boost::detail::parallel::make_pair_with_property;
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
- assert(!committed);
+ BOOST_ASSERT(!committed);
   committed = true;
 
   /// The result we will return, if we are sending a message to

Modified: branches/release/boost/graph/distributed/page_rank.hpp
==============================================================================
--- branches/release/boost/graph/distributed/page_rank.hpp (original)
+++ branches/release/boost/graph/distributed/page_rank.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -15,6 +15,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/overloading.hpp>
 #include <boost/graph/page_rank.hpp>
 #include <boost/graph/distributed/concepts.hpp>
@@ -53,7 +54,7 @@
                              1, MPI_DOUBLE,
                              get(owner, v), local(v),
                              1, MPI_DOUBLE, MPI_SUM, to_win);
- assert(MPI_SUCCESS == ret);
+ BOOST_ASSERT(MPI_SUCCESS == ret);
       }
     }
     MPI_Win_fence(0, to_win);
@@ -100,14 +101,14 @@
   process_group_type pg = process_group(g);
   process_id_type id = process_id(pg);
 
- assert(me == id);
+ BOOST_ASSERT(me == id);
 
   rank_type initial_rank = rank_type(rank_type(1) / n);
   BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, initial_rank);
 
 #ifdef WANT_MPI_ONESIDED
 
- assert(sizeof(rank_type) == sizeof(double));
+ BOOST_ASSERT(sizeof(rank_type) == sizeof(double));
 
   bool to_map_2 = true;
   MPI_Win win, win2;

Modified: branches/release/boost/graph/distributed/rmat_graph_generator.hpp
==============================================================================
--- branches/release/boost/graph/distributed/rmat_graph_generator.hpp (original)
+++ branches/release/boost/graph/distributed/rmat_graph_generator.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -13,6 +13,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <boost/graph/parallel/process_group.hpp>
 #include <math.h>
@@ -51,7 +52,7 @@
                              double d, bool permute_vertices = true)
           : gen(), done(false)
       {
- assert(a + b + c + d == 1);
+ BOOST_ASSERT(a + b + c + d == 1);
           int id = process_id(pg);
 
           this->gen.reset(new uniform_01<RandomGenerator>(gen));

Modified: branches/release/boost/graph/distributed/shuffled_distribution.hpp
==============================================================================
--- branches/release/boost/graph/distributed/shuffled_distribution.hpp (original)
+++ branches/release/boost/graph/distributed/shuffled_distribution.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -9,6 +9,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+# include <boost/assert.hpp>
 # include <boost/iterator/counting_iterator.hpp>
 # include <vector>
 
@@ -36,7 +37,7 @@
     void assign_mapping(InputIterator first, InputIterator last)
     {
         mapping_.assign(first, last);
- assert(mapping_.size() == n);
+ BOOST_ASSERT(mapping_.size() == n);
         reverse_mapping.resize(mapping_.size());
 
         for (std::vector<size_t>::iterator i(mapping_.begin());

Modified: branches/release/boost/graph/distributed/strong_components.hpp
==============================================================================
--- branches/release/boost/graph/distributed/strong_components.hpp (original)
+++ branches/release/boost/graph/distributed/strong_components.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -16,6 +16,7 @@
 
 // #define PBGL_SCC_DEBUG
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/property_map/parallel/distributed_property_map.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
@@ -511,7 +512,7 @@
 
         // Receive predecessor and successor messages and handle them
         while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg);
+ BOOST_ASSERT(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg);
           std::size_t num_requests;
           receive(pg, m->first, m->second, num_requests);
           VertexPairVec requests(num_requests);
@@ -791,7 +792,7 @@
 
       // Receive edge addition requests and handle them
       while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == fhp_edges_size_msg);
+ BOOST_ASSERT(m->second == fhp_edges_size_msg);
         std::size_t num_requests;
         receive(pg, m->first, m->second, num_requests);
         VertexPairVec requests(num_requests);

Modified: branches/release/boost/graph/erdos_renyi_generator.hpp
==============================================================================
--- branches/release/boost/graph/erdos_renyi_generator.hpp (original)
+++ branches/release/boost/graph/erdos_renyi_generator.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -10,7 +10,7 @@
 #ifndef BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP
 #define BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP
 
-#include <cassert>
+#include <boost/assert.hpp>
 #include <iterator>
 #include <utility>
 #include <boost/shared_ptr.hpp>
@@ -155,8 +155,8 @@
       // bernoulli_distribution would need to be run until it returns true.
       // Thus, this distribution can be used to step through the edges
       // which are actually present.
- assert (src != (std::numeric_limits<vertices_size_type>::max)() &&
- src != n);
+ BOOST_ASSERT (src != (std::numeric_limits<vertices_size_type>::max)() &&
+ src != n);
       while (src != n) {
         vertices_size_type increment = rand_vertex(*gen);
         size_t tgt_index_limit =

Modified: branches/release/boost/graph/graph_stats.hpp
==============================================================================
--- branches/release/boost/graph/graph_stats.hpp (original)
+++ branches/release/boost/graph/graph_stats.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -12,6 +12,7 @@
 #include <map>
 #include <list>
 #include <boost/graph/iteration_macros.hpp>
+#include <boost/assert.hpp>
 
 namespace boost { namespace graph {
 
@@ -124,7 +125,7 @@
 
   for( std::map<unsigned long, double>::iterator iter = dist.begin();
        iter != dist.end(); ++iter ) {
- assert( n[iter->first] != 0 );
+ BOOST_ASSERT( n[iter->first] != 0 );
     dist[iter->first] /= n[iter->first];
   }
 

Modified: branches/release/boost/graph/graph_test.hpp
==============================================================================
--- branches/release/boost/graph/graph_test.hpp (original)
+++ branches/release/boost/graph/graph_test.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -213,7 +213,7 @@
       IsoMap iso_map(iso_vec.begin(), get(vertex_index, g));
       copy_graph(g, cpy, orig_to_copy(iso_map));
 
- assert((verify_isomorphism(g, cpy, iso_map)));
+ BOOST_CHECK((verify_isomorphism(g, cpy, iso_map)));
 
       vertex_t v = add_vertex(g);
       

Modified: branches/release/boost/graph/graphviz.hpp
==============================================================================
--- branches/release/boost/graph/graphviz.hpp (original)
+++ branches/release/boost/graph/graphviz.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -67,7 +67,8 @@
     if (regex_match(s, valid_unquoted_id)) {
       return s;
     } else {
- return "\"" + regex_replace(s, sregex(as_xpr('"')), "\\\"") + "\"";
+ boost::algorithm::replace_all(s, "\"", "\\\"");
+ return "\"" + s + "\"";
     }
   }
 

Modified: branches/release/boost/graph/gursoy_atun_layout.hpp
==============================================================================
--- branches/release/boost/graph/gursoy_atun_layout.hpp (original)
+++ branches/release/boost/graph/gursoy_atun_layout.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,6 +17,7 @@
 
 #include <boost/config/no_tr1/cmath.hpp>
 #include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
 #include <vector>
 #include <exception>
 #include <algorithm>
@@ -169,7 +170,7 @@
     }
     min_distance_unset = false;
   }
- assert (!min_distance_unset); // Graph must have at least one vertex
+ BOOST_ASSERT (!min_distance_unset); // Graph must have at least one vertex
   boost::detail::update_position_visitor<
       PositionMap, NodeDistanceMap, Topology,
       VertexListAndIncidenceGraph>

Modified: branches/release/boost/graph/kamada_kawai_spring_layout.hpp
==============================================================================
--- branches/release/boost/graph/kamada_kawai_spring_layout.hpp (original)
+++ branches/release/boost/graph/kamada_kawai_spring_layout.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,6 +17,7 @@
 #include <utility>
 #include <iterator>
 #include <vector>
+#include <iostream>
 #include <boost/limits.hpp>
 #include <boost/config/no_tr1/cmath.hpp>
 
@@ -216,11 +217,13 @@
         weight_type edge_length =
           detail::graph::compute_edge_length(g, distance, index,
                                              edge_or_side_length);
+
+ std::cerr << "edge_length = " << edge_length << std::endl;
         
         // Compute l_{ij} and k_{ij}
         const weight_type K = spring_constant;
- vertex_iterator ui, end = vertices(g).second;
- for (ui = vertices(g).first; ui != end; ++ui) {
+ vertex_iterator ui, end;
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
           vertex_iterator vi = ui;
           for (++vi; vi != end; ++vi) {
             weight_type dij = distance[get(index, *ui)][get(index, *vi)];
@@ -237,7 +240,7 @@
         vertex_descriptor p = *vertices(g).first;
         weight_type delta_p(0);
 
- for (ui = vertices(g).first; ui != end; ++ui) {
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
           deriv_type deriv = compute_partial_derivatives(*ui);
           put(partial_derivatives, *ui, deriv);
 
@@ -255,12 +258,25 @@
           // update the delta_i values in O(n) time instead of O(n^2)
           // time.
           std::vector<deriv_type> p_partials(num_vertices(g));
- for (ui = vertices(g).first; ui != end; ++ui) {
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
             vertex_descriptor i = *ui;
             p_partials[get(index, i)] = compute_partial_derivative(i, p);
           }
 
           do {
+ // For debugging, compute the energy value E
+ double E = 0.;
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
+ vertex_iterator vi = ui;
+ for (++vi; vi != end; ++vi) {
+ double dist = topology.distance(position[*ui], position[*vi]);
+ weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)];
+ weight_type l_ij = distance[get(index, *ui)][get(index, *vi)];
+ E += .5 * k_ij * (dist - l_ij) * (dist - l_ij);
+ }
+ }
+ std::cerr << "E = " << E << std::endl;
+
             // Compute the elements of the Jacobian
             // From
             // http://www.cs.panam.edu/~rfowler/papers/1994_kumar_fowler_A_Spring_UTPACSTR.pdf
@@ -269,7 +285,7 @@
             for (std::size_t i = 0; i < Point::dimensions; ++i)
               for (std::size_t j = 0; j < Point::dimensions; ++j)
                 dE_d_d[i][j] = 0.;
- for (ui = vertices(g).first; ui != end; ++ui) {
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
               vertex_descriptor i = *ui;
               if (i != p) {
                 point_difference_type diff = topology.difference(position[p], position[i]);
@@ -284,6 +300,7 @@
                       dE_d_d[i][i] += k_mi * (1 + (l_mi * (diff[i] * diff[i] - dist_squared) * inv_dist_cubed));
                     } else {
                       dE_d_d[i][j] += k_mi * l_mi * diff[i] * diff[j] * inv_dist_cubed;
+ // dE_d_d[i][j] += k_mi * l_mi * sqrt(hypot(diff[i], diff[j])) * inv_dist_cubed;
                     }
                   }
                 }
@@ -292,7 +309,7 @@
 
             deriv_type dE_d = get(partial_derivatives, p);
 
- // Solve dE_d_d * delta = dE_d to get delta
+ // Solve dE_d_d * delta = -dE_d to get delta
             point_difference_type delta = -linear_solver<Point::dimensions>::solve(dE_d_d, dE_d);
 
             // Move p by delta
@@ -307,7 +324,7 @@
 
           // Select new p by updating each partial derivative and delta
           vertex_descriptor old_p = p;
- for (ui = vertices(g).first; ui != end; ++ui) {
+ for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) {
             deriv_type old_deriv_p = p_partials[get(index, *ui)];
             deriv_type old_p_partial =
               compute_partial_derivative(*ui, old_p);

Modified: branches/release/boost/graph/loop_erased_random_walk.hpp
==============================================================================
--- branches/release/boost/graph/loop_erased_random_walk.hpp (original)
+++ branches/release/boost/graph/loop_erased_random_walk.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -15,7 +15,7 @@
 #include <boost/graph/random.hpp>
 #include <boost/next_prior.hpp>
 #include <vector>
-#include <cassert>
+#include <boost/assert.hpp>
 
 namespace boost {
 
@@ -51,7 +51,7 @@
     typedef typename boost::property_traits<ColorMap>::value_type color_t;
     typedef boost::color_traits<color_t> color_gen;
     
- assert (get(color, s) == color_gen::white());
+ BOOST_ASSERT (get(color, s) == color_gen::white());
     path.clear();
     path.push_back(s);
     put(color, s, color_gen::gray());
@@ -67,7 +67,7 @@
         // Found a loop; delete from path from the first occurrence of t to the
         // end, coloring vertices white.
         typename std::vector<vertex_descriptor>::iterator it = std::find(path.begin(), path.end(), t);
- assert (it != path.end());
+ BOOST_ASSERT (it != path.end());
         ++it;
         for (typename std::vector<vertex_descriptor>::iterator j = it; j != path.end(); ++j) {
           put(color, *j, color_gen::white());

Modified: branches/release/boost/graph/mesh_graph_generator.hpp
==============================================================================
--- branches/release/boost/graph/mesh_graph_generator.hpp (original)
+++ branches/release/boost/graph/mesh_graph_generator.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -11,7 +11,7 @@
 
 #include <iterator>
 #include <utility>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/graph/graph_traits.hpp>
 #include <boost/type_traits/is_base_and_derived.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -47,7 +47,7 @@
                   bool toroidal = true)
       : x(x), y(y), n(x*y), source(0), target(1), current(0,1),
         toroidal(toroidal), done(false)
- { assert(x > 1 && y > 1); }
+ { BOOST_ASSERT(x > 1 && y > 1); }
 
     reference operator*() const { return current; }
     pointer operator->() const { return &current; }

Modified: branches/release/boost/graph/minimum_degree_ordering.hpp
==============================================================================
--- branches/release/boost/graph/minimum_degree_ordering.hpp (original)
+++ branches/release/boost/graph/minimum_degree_ordering.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -12,7 +12,7 @@
 #define MINIMUM_DEGREE_ORDERING_HPP
 
 #include <vector>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/config.hpp>
 #include <boost/pending/bucket_sorter.hpp>
 #include <boost/detail/numeric_traits.hpp> // for integer_traits
@@ -53,7 +53,7 @@
           : data(_data), current(-(std::numeric_limits<value_type>::max)()) {}
         
         void pop() {
- assert(! empty());
+ BOOST_ASSERT(! empty());
           current = data[current];
         }
         void push(value_type v) {

Modified: branches/release/boost/graph/named_function_params.hpp
==============================================================================
--- branches/release/boost/graph/named_function_params.hpp (original)
+++ branches/release/boost/graph/named_function_params.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -584,14 +584,18 @@
         g_hasQ =
           (parameter_exists<ArgPack, PriorityQueueTag>
            ::value));
+ typedef boost::reference_wrapper<int> int_refw;
+ typedef typename boost::parameter::value_type<
+ ArgPack,
+ PriorityQueueTag,
+ int_refw
+ >::type
+ param_value_type_wrapper;
+ typedef typename param_value_type_wrapper::type
+ param_value_type;
+ typedef typename boost::remove_const<param_value_type>::type param_value_type_no_const;
       typedef priority_queue_maker_helper<g_hasQ, Graph, ArgPack, KeyT, ValueT, KeyMapTag, IndexInHeapMapTag, Compare,
- typename boost::remove_const<
- typename boost::parameter::value_type<
- ArgPack,
- PriorityQueueTag,
- boost::reference_wrapper<int>
- >::type::type
- >::type> helper;
+ param_value_type_no_const> helper;
       typedef typename helper::priority_queue_type priority_queue_type;
 
       static priority_queue_type make_queue(const Graph& g, const ArgPack& ap, KeyT defaultKey) {

Modified: branches/release/boost/graph/one_bit_color_map.hpp
==============================================================================
--- branches/release/boost/graph/one_bit_color_map.hpp (original)
+++ branches/release/boost/graph/one_bit_color_map.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -18,6 +18,7 @@
 #include <boost/graph/properties.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/config.hpp>
+#include <boost/assert.hpp>
 #include <algorithm>
 #include <limits>
 
@@ -65,7 +66,7 @@
 {
   BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map<IndexMap>::bits_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
- assert ((std::size_t)i < pm.n);
+ BOOST_ASSERT ((std::size_t)i < pm.n);
   return one_bit_color_type((pm.data.get()[i / bits_per_char] >> (i % bits_per_char)) & 1);
 }
 
@@ -77,8 +78,8 @@
 {
   BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map<IndexMap>::bits_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
- assert ((std::size_t)i < pm.n);
- assert (value >= 0 && value < 2);
+ BOOST_ASSERT ((std::size_t)i < pm.n);
+ BOOST_ASSERT (value >= 0 && value < 2);
   std::size_t byte_num = i / bits_per_char;
   std::size_t bit_position = (i % bits_per_char);
     pm.data.get()[byte_num] =

Modified: branches/release/boost/graph/parallel/distribution.hpp
==============================================================================
--- branches/release/boost/graph/parallel/distribution.hpp (original)
+++ branches/release/boost/graph/parallel/distribution.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -18,6 +18,7 @@
 #include <vector>
 #include <algorithm>
 #include <numeric>
+#include <boost/assert.hpp>
 #include <boost/iterator/counting_iterator.hpp>
 #include <boost/random/uniform_int.hpp>
 #include <boost/shared_ptr.hpp>
@@ -194,7 +195,7 @@
   explicit uneven_block(const LinearProcessGroup& pg, const std::vector<std::size_t>& local_sizes)
     : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes)
   {
- assert(local_sizes.size() == p);
+ BOOST_ASSERT(local_sizes.size() == p);
     local_starts.resize(p + 1);
     local_starts[0] = 0;
     std::partial_sum(local_sizes.begin(), local_sizes.end(), &local_starts[1]);
@@ -219,7 +220,7 @@
   template<typename SizeType>
   SizeType operator()(SizeType i) const
   {
- assert (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range
+ BOOST_ASSERT (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range
     size_vector::const_iterator lb = std::lower_bound(local_starts.begin(), local_starts.end(), (std::size_t) i);
     return ((SizeType)(*lb) == i ? lb : --lb) - local_starts.begin();
   }
@@ -402,7 +403,7 @@
 
     std::cerr << "global(" << i << "@" << id << ") = " << result
               << " =? " << local(result) << std::endl;
- assert(i == local(result));
+ BOOST_ASSERT(i == local(result));
     return result;
   }
 

Modified: branches/release/boost/graph/properties.hpp
==============================================================================
--- branches/release/boost/graph/properties.hpp (original)
+++ branches/release/boost/graph/properties.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -11,7 +11,7 @@
 #define BOOST_GRAPH_PROPERTIES_HPP
 
 #include <boost/config.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/pending/property.hpp>
 #include <boost/detail/workaround.hpp>
 
@@ -353,7 +353,7 @@
>
   make_container_vertex_map(RandomAccessContainer& c, const PropertyGraph& g)
   {
- assert(c.size() >= num_vertices(g));
+ BOOST_ASSERT(c.size() >= num_vertices(g));
     return make_iterator_vertex_map(c.begin(), g);
   }
 

Modified: branches/release/boost/graph/push_relabel_max_flow.hpp
==============================================================================
--- branches/release/boost/graph/push_relabel_max_flow.hpp (original)
+++ branches/release/boost/graph/push_relabel_max_flow.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -11,7 +11,7 @@
 #define BOOST_PUSH_RELABEL_MAX_FLOW_HPP
 
 #include <boost/config.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <vector>
 #include <list>
 #include <iosfwd>
@@ -266,7 +266,7 @@
       // but it is called "discharge" in the paper and in hi_pr.c.
       void discharge(vertex_descriptor u)
       {
- assert(get(excess_flow, u) > 0);
+ BOOST_ASSERT(get(excess_flow, u) > 0);
         while (1) {
           out_edge_iterator ai, ai_end;
           for (boost::tie(ai, ai_end) = current[u]; ai != ai_end; ++ai) {
@@ -703,8 +703,8 @@
     
     algo.convert_preflow_to_flow();
     
- assert(algo.is_flow());
- assert(algo.is_optimal());
+ BOOST_ASSERT(algo.is_flow());
+ BOOST_ASSERT(algo.is_optimal());
     
     return flow;
   } // push_relabel_max_flow()

Modified: branches/release/boost/graph/random.hpp
==============================================================================
--- branches/release/boost/graph/random.hpp (original)
+++ branches/release/boost/graph/random.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -26,7 +26,7 @@
 #include <boost/type_traits/is_convertible.hpp>
 
 #include <iostream>
-#include <cassert>
+#include <boost/assert.hpp>
 
 namespace boost {
 
@@ -104,7 +104,7 @@
         chosen_weight -= w;
       }
     }
- assert (false); // Should not get here
+ BOOST_ASSERT (false); // Should not get here
   }
 
   namespace detail {

Modified: branches/release/boost/graph/random_spanning_tree.hpp
==============================================================================
--- branches/release/boost/graph/random_spanning_tree.hpp (original)
+++ branches/release/boost/graph/random_spanning_tree.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -11,6 +11,7 @@
 #define BOOST_GRAPH_RANDOM_SPANNING_TREE_HPP
 
 #include <vector>
+#include <boost/assert.hpp>
 #include <boost/graph/loop_erased_random_walk.hpp>
 #include <boost/graph/random.hpp>
 #include <boost/graph/iteration_macros.hpp>
@@ -34,7 +35,7 @@
       typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
       typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
 
- assert (num_vertices(g) >= 1); // g must also be undirected (or symmetric) and connected
+ BOOST_ASSERT (num_vertices(g) >= 1); // g must also be undirected (or symmetric) and connected
 
       typedef color_traits<typename property_traits<ColorMap>::value_type> color_gen;
       BGL_FORALL_VERTICES_T(v, g, Graph) put(color, v, color_gen::white());
@@ -53,7 +54,7 @@
              ++i) {
           typename std::vector<vertex_descriptor>::const_reverse_iterator j = i;
           ++j;
- assert (get(color, *j) == color_gen::gray());
+ BOOST_ASSERT (get(color, *j) == color_gen::gray());
           put(color, *j, color_gen::black());
           put(pred, *j, *i);
         }

Modified: branches/release/boost/graph/rmat_graph_generator.hpp
==============================================================================
--- branches/release/boost/graph/rmat_graph_generator.hpp (original)
+++ branches/release/boost/graph/rmat_graph_generator.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -16,6 +16,7 @@
 #include <queue>
 #include <map>
 #include <boost/shared_ptr.hpp>
+#include <boost/assert.hpp>
 #include <boost/random/uniform_int.hpp>
 #include <boost/random/uniform_01.hpp>
 #include <boost/graph/graph_traits.hpp>
@@ -155,7 +156,7 @@
     {
       this->gen.reset(new uniform_01<RandomGenerator>(gen));
 
- assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
+ BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
 
       if (permute_vertices)
         generate_permutation_vector(gen, vertexPermutation, n);
@@ -265,7 +266,7 @@
         values(sort_pair<vertices_size_type>()), done(false)
 
     {
- assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
+ BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
 
       this->gen.reset(new uniform_01<RandomGenerator>(gen));
 
@@ -366,7 +367,7 @@
       : gen(), done(false)
 
     {
- assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
+ BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
 
       this->gen.reset(new uniform_01<RandomGenerator>(gen));
 
@@ -479,7 +480,7 @@
         values(sort_pair<vertices_size_type>()), done(false)
 
     {
- assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
+ BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5)));
 
       this->gen.reset(new uniform_01<RandomGenerator>(gen));
 

Modified: branches/release/boost/graph/stoer_wagner_min_cut.hpp
==============================================================================
--- branches/release/boost/graph/stoer_wagner_min_cut.hpp (original)
+++ branches/release/boost/graph/stoer_wagner_min_cut.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -6,7 +6,7 @@
 #ifndef BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP
 #define BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP 1
 
-#include <cassert>
+#include <boost/assert.hpp>
 #include <set>
 #include <vector>
 #include <boost/concept_check.hpp>
@@ -61,7 +61,7 @@
       typedef typename boost::graph_traits<UndirectedGraph>::vertex_descriptor vertex_descriptor;
       typedef typename boost::property_traits<WeightMap>::value_type weight_type;
       
- assert(pq.empty());
+ BOOST_ASSERT(pq.empty());
       typename KeyedUpdatablePriorityQueue::key_map keys = pq.keys();
       
       BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) {
@@ -72,7 +72,7 @@
         }
       }
       
- assert(pq.size() >= 2);
+ BOOST_ASSERT(pq.size() >= 2);
       
       vertex_descriptor s = boost::graph_traits<UndirectedGraph>::null_vertex();
       vertex_descriptor t = boost::graph_traits<UndirectedGraph>::null_vertex();
@@ -169,7 +169,7 @@
       weight_type bestW;
       
       boost::tie(s, t, bestW) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq);
- assert(s != t);
+ BOOST_ASSERT(s != t);
       BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) {
         put(parities, v, parity_type(v == t ? 1 : 0));
       }
@@ -180,7 +180,7 @@
       for (; n >= 2; --n) {
         weight_type w;
         boost::tie(s, t, w) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq);
- assert(s != t);
+ BOOST_ASSERT(s != t);
         
         if (w < bestW) {
           BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) {
@@ -201,7 +201,7 @@
         assignedVertices.insert(t);
       }
       
- assert(pq.empty());
+ BOOST_ASSERT(pq.empty());
       
       return bestW;
     }

Modified: branches/release/boost/graph/subgraph.hpp
==============================================================================
--- branches/release/boost/graph/subgraph.hpp (original)
+++ branches/release/boost/graph/subgraph.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -16,7 +16,7 @@
 #include <list>
 #include <vector>
 #include <map>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/graph/graph_traits.hpp>
 #include <boost/graph/graph_mutability_traits.hpp>
 #include <boost/graph/properties.hpp>
@@ -181,7 +181,7 @@
         vertex_descriptor u_local; bool in_subgraph;
         if (is_root()) return u_global;
         boost::tie(u_local, in_subgraph) = this->find_vertex(u_global);
- assert(in_subgraph == true);
+ BOOST_ASSERT(in_subgraph == true);
         return u_local;
     }
 
@@ -345,8 +345,8 @@
 add_vertex(typename subgraph<G>::vertex_descriptor u_global,
            subgraph<G>& g)
 {
- assert(!g.is_root());
- typename subgraph<G>::vertex_descriptor u_local, v_global, uu_global;
+ BOOST_ASSERT(!g.is_root());
+ typename subgraph<G>::vertex_descriptor u_local, v_global;
     typename subgraph<G>::edge_descriptor e_global;
 
     u_local = add_vertex(g.m_graph);
@@ -371,11 +371,13 @@
         typename subgraph<G>::out_edge_iterator ei, ei_end;
         for(boost::tie(vi, vi_end) = vertices(r); vi != vi_end; ++vi) {
             v_global = *vi;
- if(g.find_vertex(v_global).second)
+ if (v_global == u_global)
+ continue; // don't insert self loops twice!
+ if (!g.find_vertex(v_global).second)
+ continue; // not a subgraph vertex => try next one
             for(boost::tie(ei, ei_end) = out_edges(*vi, r); ei != ei_end; ++ei) {
                 e_global = *ei;
- uu_global = target(e_global, r);
- if(uu_global == u_global && g.find_vertex(v_global).second) {
+ if(target(e_global, r) == u_global) {
                     g.local_add_edge(g.global_to_local(v_global), u_local, e_global);
                 }
             }
@@ -749,7 +751,7 @@
 // TODO: Under Construction
 template <typename G>
 void remove_vertex(typename subgraph<G>::vertex_descriptor u, subgraph<G>& g)
-{ assert(false); }
+{ BOOST_ASSERT(false); }
 #endif
 
 //===========================================================================

Modified: branches/release/boost/graph/two_bit_color_map.hpp
==============================================================================
--- branches/release/boost/graph/two_bit_color_map.hpp (original)
+++ branches/release/boost/graph/two_bit_color_map.hpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -17,6 +17,7 @@
 #include <boost/graph/properties.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/config.hpp>
+#include <boost/assert.hpp>
 #include <algorithm>
 #include <limits>
 
@@ -68,7 +69,7 @@
 {
   BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
- assert ((std::size_t)i < pm.n);
+ BOOST_ASSERT ((std::size_t)i < pm.n);
   std::size_t byte_num = i / elements_per_char;
   std::size_t bit_position = ((i % elements_per_char) * 2);
   return two_bit_color_type((pm.data.get()[byte_num] >> bit_position) & 3);
@@ -82,8 +83,8 @@
 {
   BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
- assert ((std::size_t)i < pm.n);
- assert (value >= 0 && value < 4);
+ BOOST_ASSERT ((std::size_t)i < pm.n);
+ BOOST_ASSERT (value >= 0 && value < 4);
   std::size_t byte_num = i / elements_per_char;
   std::size_t bit_position = ((i % elements_per_char) * 2);
     pm.data.get()[byte_num] =

Modified: branches/release/libs/graph/src/read_graphviz_new.cpp
==============================================================================
--- branches/release/libs/graph/src/read_graphviz_new.cpp (original)
+++ branches/release/libs/graph/src/read_graphviz_new.cpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -26,6 +26,7 @@
 //
 
 #define BOOST_GRAPH_SOURCE
+#include <boost/assert.hpp>
 #include <boost/ref.hpp>
 #include <boost/function/function2.hpp>
 #include <boost/property_map/dynamic_property_map.hpp>
@@ -167,10 +168,10 @@
 #endif
         boost::regex_search(begin, end, results, stuff_to_skip);
 #ifndef NDEBUG
- assert (found);
+ BOOST_ASSERT (found);
 #endif
       boost::sub_match<std::string::const_iterator> sm1 = results.suffix();
- assert (sm1.second == end);
+ BOOST_ASSERT (sm1.second == end);
       begin = sm1.first;
     }
 
@@ -227,10 +228,10 @@
             switch (str[1]) {
               case '-': return token(token::dash_dash, str);
               case '>': return token(token::dash_greater, str);
- default: assert (!"Definition of punctuation_token does not match switch statement");
+ default: BOOST_ASSERT (!"Definition of punctuation_token does not match switch statement");
             }
           }
- default: assert (!"Definition of punctuation_token does not match switch statement");
+ default: BOOST_ASSERT (!"Definition of punctuation_token does not match switch statement");
         }
       }
       found = boost::regex_search(begin, end, results, number_token);
@@ -244,7 +245,7 @@
         std::string str = results[1].str();
         begin = results.suffix().first;
         // Remove the beginning and ending quotes
- assert (str.size() >= 2);
+ BOOST_ASSERT (str.size() >= 2);
         str.erase(str.begin());
         str.erase(str.end() - 1);
         // Unescape quotes in the middle, but nothing else (see format spec)
@@ -500,7 +501,7 @@
         case token::kw_graph: parse_attr_list(current_graph_props()); break;
         case token::kw_node: parse_attr_list(current().def_node_props); break;
         case token::kw_edge: parse_attr_list(current().def_edge_props); break;
- default: assert (!"Bad attr_stmt case");
+ default: BOOST_ASSERT (!"Bad attr_stmt case");
       }
     }
 
@@ -637,7 +638,7 @@
       }
       properties this_edge_props = current().def_edge_props;
       if (peek().type == token::left_bracket) parse_attr_list(this_edge_props);
- assert (nodes_in_chain.size() >= 2); // Should be in node parser otherwise
+ BOOST_ASSERT (nodes_in_chain.size() >= 2); // Should be in node parser otherwise
       for (size_t i = 0; i + 1 < nodes_in_chain.size(); ++i) {
         do_orig_edge(nodes_in_chain[i], nodes_in_chain[i + 1], this_edge_props);
       }
@@ -780,7 +781,7 @@
       }
     }
     std::map<subgraph_name, properties>::const_iterator root_graph_props_i = r.graph_props.find("___root___");
- assert (root_graph_props_i != r.graph_props.end()); // Should not happen
+ BOOST_ASSERT (root_graph_props_i != r.graph_props.end()); // Should not happen
     const properties& root_graph_props = root_graph_props_i->second;
     // std::cerr << "ending graph " << props_to_string(root_graph_props) << std::endl;
     for (properties::const_iterator i = root_graph_props.begin(); i != root_graph_props.end(); ++i) {

Modified: branches/release/libs/graph_parallel/src/mpi_process_group.cpp
==============================================================================
--- branches/release/libs/graph_parallel/src/mpi_process_group.cpp (original)
+++ branches/release/libs/graph_parallel/src/mpi_process_group.cpp 2011-01-11 13:17:40 EST (Tue, 11 Jan 2011)
@@ -9,6 +9,7 @@
 // Authors: Douglas Gregor
 // Andrew Lumsdaine
 // Matthias Troyer
+#include <boost/assert.hpp>
 #include <boost/graph/use_mpi.hpp>
 #include <boost/graph/distributed/mpi_process_group.hpp>
 #include <boost/mpi/environment.hpp>
@@ -172,7 +173,7 @@
   std::size_t stage = static_cast<std::size_t>(
     ++self.impl_->synchronizing_stage[source]);
 
- assert(source != process_id(self));
+ BOOST_ASSERT(source != process_id(self));
 
 #ifdef DEBUG
   std::ostringstream out;
@@ -183,7 +184,7 @@
 
   // record how many still have messages to be sent
   if (self.impl_->synchronizing_unfinished.size()<=stage) {
- assert(self.impl_->synchronizing_unfinished.size() == stage);
+ BOOST_ASSERT(self.impl_->synchronizing_unfinished.size() == stage);
     self.impl_->synchronizing_unfinished.push_back(val >= 0 ? 1 : 0);
   }
   else
@@ -191,7 +192,7 @@
 
   // record how many are in that stage
   if (self.impl_->processors_synchronizing_stage.size()<=stage) {
- assert(self.impl_->processors_synchronizing_stage.size() == stage);
+ BOOST_ASSERT(self.impl_->processors_synchronizing_stage.size() == stage);
     self.impl_->processors_synchronizing_stage.push_back(1);
   }
   else
@@ -346,7 +347,7 @@
 
 int mpi_process_group::allocate_block(bool out_of_band_receive)
 {
- assert(!block_num);
+ BOOST_ASSERT(!block_num);
   block_iterator i = impl_->blocks.begin();
   while (i != impl_->blocks.end() && *i) ++i;
 
@@ -372,7 +373,7 @@
 {
   std::pair<int, int> decoded = decode_tag(encoded_tag);
 
- assert (decoded.first < static_cast<int>(impl_->blocks.size()));
+ BOOST_ASSERT (decoded.first < static_cast<int>(impl_->blocks.size()));
 
   block_type* block = impl_->blocks[decoded.first];
   if (!block) {
@@ -384,7 +385,7 @@
       if (impl_->blocks[i])
         std::cerr << i << ' ';
     std::cerr << std::endl;
- assert(block);
+ BOOST_ASSERT(block);
   }
   
   if (decoded.second < static_cast<int>(block->triggers.size())
@@ -414,7 +415,7 @@
 
   // Find the block that will receive this message
   block_type* block = impl_->blocks[decoded.first];
- assert(block);
+ BOOST_ASSERT(block);
   if (decoded.second < static_cast<int>(block->triggers.size())
       && block->triggers[decoded.second])
     // We have a trigger for this message; use it
@@ -526,7 +527,7 @@
   // we increment the number of batches sent
   ++impl_->number_sent_batches[dest];
   // and send the batch
- assert(outgoing.headers.size() <= impl_->batch_header_number);
+ BOOST_ASSERT(outgoing.headers.size() <= impl_->batch_header_number);
   if (id != dest) {
 #ifdef NO_ISEND_BATCHES
     impl::batch_request req;
@@ -559,7 +560,7 @@
       MPI_Isend(const_cast<void*>(oa.address()), oa.size(),
                 MPI_PACKED, dest, tag, impl_->comm,
                 &req.request);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
     impl_->max_sent = (std::max)(impl_->max_sent,impl_->sent_batches.size());
 #ifdef NO_ISEND_BATCHES
     int done=0;
@@ -794,10 +795,10 @@
        ++impl_->synchronizing_stage[id];
        if (impl_->synchronizing_stage[id] != stage)
          std::cerr << "Expected stage " << stage << ", got " << impl_->synchronizing_stage[id] << std::endl;
- assert(impl_->synchronizing_stage[id]==stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[id]==stage);
       // record how many still have messages to be sent
       if (static_cast<int>(impl_->synchronizing_unfinished.size())<=stage) {
- assert(static_cast<int>(impl_->synchronizing_unfinished.size()) == stage);
+ BOOST_ASSERT(static_cast<int>(impl_->synchronizing_unfinished.size()) == stage);
         impl_->synchronizing_unfinished.push_back(no_new_messages ? 0 : 1);
       }
       else
@@ -805,7 +806,7 @@
 
       // record how many are in that stage
       if (static_cast<int>(impl_->processors_synchronizing_stage.size())<=stage) {
- assert(static_cast<int>(impl_->processors_synchronizing_stage.size()) == stage);
+ BOOST_ASSERT(static_cast<int>(impl_->processors_synchronizing_stage.size()) == stage);
         impl_->processors_synchronizing_stage.push_back(1);
       }
       else
@@ -841,7 +842,7 @@
 
       // check that everyone is at least here
       for (int source=0; source<p ; ++source)
- assert(impl_->synchronizing_stage[source] >= stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[source] >= stage);
 
       // receive any batches sent in the meantime
       // all have to be available already
@@ -857,7 +858,7 @@
       
 #ifndef NO_IMMEDIATE_PROCESSING
       for (int source=0; source<p ; ++source)
- assert(impl_->number_received_batches[source] >= 0);
+ BOOST_ASSERT(impl_->number_received_batches[source] >= 0);
 #endif
 
       impl_->synchronizing = false;
@@ -888,7 +889,7 @@
                 << source << ", got " << impl_->synchronizing_stage[source]
                 << std::endl;
     }
- assert(impl_->synchronizing_stage[source]==stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[source]==stage);
   }
 #endif
   std::fill(impl_->synchronizing_stage.begin(),
@@ -900,10 +901,10 @@
   impl_->synchronizing_unfinished.clear();
 
   for (process_id_type dest = 0; dest < p; ++dest)
- assert (impl_->outgoing[dest].headers.empty());
+ BOOST_ASSERT (impl_->outgoing[dest].headers.empty());
 #ifndef NO_IMMEDIATE_PROCESSING
       for (int source=0; source<p ; ++source)
- assert (impl_->number_received_batches[source] == 0);
+ BOOST_ASSERT (impl_->number_received_batches[source] == 0);
 #endif
 
   impl_->free_sent_batches();
@@ -952,7 +953,7 @@
       std::pair<int, int> decoded = decode_tag(statuses[i].MPI_TAG);
       block_type* block = impl_->blocks[decoded.first];
       
- assert (decoded.second < static_cast<int>(block->triggers.size()) && block->triggers[decoded.second]);
+ BOOST_ASSERT (decoded.second < static_cast<int>(block->triggers.size()) && block->triggers[decoded.second]);
         // We have a trigger for this message; use it
       trigger_receive_context old_context = impl_->trigger_context;
       impl_->trigger_context = trc_irecv_out_of_band;
@@ -1033,7 +1034,7 @@
   int result;
   while(it != sent_batches.end()) {
     result = MPI_Test(&it->request,&flag,MPI_STATUS_IGNORE);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
     iterator next=it;
     ++next;
     if (flag)
@@ -1044,7 +1045,7 @@
   for (std::size_t i=0; i< batch_pool.size();++i) {
     if(batch_pool[i].request != MPI_REQUEST_NULL) {
       result = MPI_Test(&batch_pool[i].request,&flag,MPI_STATUS_IGNORE);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
       if (flag) {
         free_batches.push(i);
         batch_pool[i].request = MPI_REQUEST_NULL;
@@ -1060,7 +1061,7 @@
       shared_ptr<trigger_base> const& launcher)
 {
   block_type* my_block = impl_->blocks[block];
- assert(my_block);
+ BOOST_ASSERT(my_block);
 
   // Make sure we have enough space in the structure for this trigger.
   if (launcher->tag() >= static_cast<int>(my_block->triggers.size()))
@@ -1073,7 +1074,7 @@
               << " already has a trigger for tag " << launcher->tag()
               << std::endl;
   }
- assert(!my_block->triggers[launcher->tag()]);
+ BOOST_ASSERT(!my_block->triggers[launcher->tag()]);
 
   // Attach a new trigger launcher
   my_block->triggers[launcher->tag()] = launcher;
@@ -1091,8 +1092,8 @@
   void* ptr;
   if (!message_buffer.empty()) {
     MPI_Buffer_detach(&ptr,&sz);
- assert(ptr == &message_buffer.front());
- assert(static_cast<std::size_t>(sz) == message_buffer.size());
+ BOOST_ASSERT(ptr == &message_buffer.front());
+ BOOST_ASSERT(static_cast<std::size_t>(sz) == message_buffer.size());
   }
   else if (old_buffer != 0)
     MPI_Buffer_detach(&old_buffer,&old_buffer_size);


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