From 0d52712c3dd00714d14db114daef94978dbc8481 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 21 Mar 2006 02:26:31 +0000 Subject: [PATCH 001/279] This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'. [SVN r33417] From 9a10195600b21d57c01288d708fee3033e519259 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 7 Apr 2006 13:49:45 +0000 Subject: [PATCH 002/279] Merge from trunk [SVN r33595] --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index cd0724fc..5ef8179f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -57,7 +57,7 @@ test-suite graph_test : [ run gursoy_atun_layout_test.cpp ] - [ run layout_test.cpp : : : always_show_run_output ] + [ run layout_test.cpp : : : always_show_run_output intel:off ] [ compile reverse_graph_cc.cpp ] From 64428fc0746b895a536460f115907b44d064127e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 10 Apr 2006 19:24:49 +0000 Subject: [PATCH 003/279] Move enum out of GraphParse::operator() [SVN r33641] --- include/boost/graph/adjacency_list_io.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/graph/adjacency_list_io.hpp b/include/boost/graph/adjacency_list_io.hpp index 74f47409..dc4ca503 100644 --- a/include/boost/graph/adjacency_list_io.hpp +++ b/include/boost/graph/adjacency_list_io.hpp @@ -115,6 +115,7 @@ void getSubset(T&, const no_property&) // get property subset //=========================================================================== // graph parser +typedef enum{ PARSE_NUM_NODES, PARSE_VERTEX, PARSE_EDGE } GraphParserState; template @@ -131,7 +132,6 @@ struct GraphParser typedef typename graph_traits::vertex_descriptor Vertex; std::vector nodes; - typedef enum{ PARSE_NUM_NODES, PARSE_VERTEX, PARSE_EDGE } State; State state = PARSE_VERTEX; unsigned int numLine = 1; From 891ec4e4e3aaf1d3da52d61b3c94aad137cd166e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 10 Apr 2006 19:27:23 +0000 Subject: [PATCH 004/279] Move enum out of GraphParse::operator() [SVN r33642] --- include/boost/graph/adjacency_list_io.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/graph/adjacency_list_io.hpp b/include/boost/graph/adjacency_list_io.hpp index dc4ca503..fb762fe0 100644 --- a/include/boost/graph/adjacency_list_io.hpp +++ b/include/boost/graph/adjacency_list_io.hpp @@ -132,7 +132,7 @@ struct GraphParser typedef typename graph_traits::vertex_descriptor Vertex; std::vector nodes; - State state = PARSE_VERTEX; + GraphParserState state = PARSE_VERTEX; unsigned int numLine = 1; char c; From 0b1a337f52c2235b6c00dadeab6a271f7a06234c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 10 Apr 2006 20:09:33 +0000 Subject: [PATCH 005/279] Don't generate self edges when asked not to, from Johan Oudinet [SVN r33644] --- include/boost/graph/plod_generator.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/graph/plod_generator.hpp b/include/boost/graph/plod_generator.hpp index 4e19a6bb..d1ac2ada 100644 --- a/include/boost/graph/plod_generator.hpp +++ b/include/boost/graph/plod_generator.hpp @@ -89,7 +89,9 @@ namespace boost { source = x(*gen); } while ((*out_degrees)[source].second == 0); current.first = (*out_degrees)[source].first; - current.second = x(*gen); + do { + current.second = x(*gen); + } while (current.first == current.second && !allow_self_loops); --degrees_left; if (--(*out_degrees)[source].second == 0) { (*out_degrees)[source] = out_degrees->back(); From fb06d7e38ece4b971453229f2a398ab6f4f0a694 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 2 Jun 2006 14:27:15 +0000 Subject: [PATCH 006/279] directed_category need only be convertible to one of directed_tag or undirected_tag [SVN r34133] --- doc/Graph.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Graph.html b/doc/Graph.html index d1a6189c..a37b4d72 100644 --- a/doc/Graph.html +++ b/doc/Graph.html @@ -74,7 +74,7 @@ and Equality Compa
boost::graph_traits<G>::directed_category
-The choices are directed_tag and undirected_tag. +This type shall be convertible to directed_tag or undirected_tag. From 05a7299c0eb254302e7ca9d3aafe04dafe64ca90 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 2 Jun 2006 15:52:46 +0000 Subject: [PATCH 007/279] Be consistent about initialize_vertex calls [SVN r34135] --- doc/BellmanFordVisitor.html | 10 ---------- include/boost/graph/astar_search.hpp | 1 + include/boost/graph/dijkstra_shortest_paths.hpp | 1 + 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/doc/BellmanFordVisitor.html b/doc/BellmanFordVisitor.html index addf198b..65ab652b 100644 --- a/doc/BellmanFordVisitor.html +++ b/doc/BellmanFordVisitor.html @@ -79,16 +79,6 @@ none NameExpressionReturn TypeDescription - -Initialize Vertex -vis.initialize_vertex(s, g) -void - -This is invoked on every vertex of the graph before the start of the -graph search. - - - Examine Edge vis.examine_edge(e, g) diff --git a/include/boost/graph/astar_search.hpp b/include/boost/graph/astar_search.hpp index 0b0f51f2..e1b95c4a 100644 --- a/include/boost/graph/astar_search.hpp +++ b/include/boost/graph/astar_search.hpp @@ -301,6 +301,7 @@ namespace boost { put(distance, *ui, inf); put(cost, *ui, inf); put(predecessor, *ui, *ui); + vis.initialize_vertex(*ui, g); } put(distance, s, zero); put(cost, s, h(s)); diff --git a/include/boost/graph/dijkstra_shortest_paths.hpp b/include/boost/graph/dijkstra_shortest_paths.hpp index ea4b485d..ef6b824c 100644 --- a/include/boost/graph/dijkstra_shortest_paths.hpp +++ b/include/boost/graph/dijkstra_shortest_paths.hpp @@ -32,6 +32,7 @@ namespace boost { struct DijkstraVisitorConcept { void constraints() { function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); vis.discover_vertex(u, g); vis.examine_vertex(u, g); vis.examine_edge(e, g); From 1b468cb8aa00af1e8f0bd4e9cec3c8b80f5f26ab Mon Sep 17 00:00:00 2001 From: Caleb Epstein Date: Mon, 19 Jun 2006 14:49:21 +0000 Subject: [PATCH 008/279] boost/graph/{king_ordering,cuthill_mckee_ordering}.hpp: Fix for typedef conflict with DS macro on Solaris [SVN r34355] --- include/boost/graph/cuthill_mckee_ordering.hpp | 6 +++--- include/boost/graph/king_ordering.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/graph/cuthill_mckee_ordering.hpp b/include/boost/graph/cuthill_mckee_ordering.hpp index 6c9dfa9a..61336ab1 100644 --- a/include/boost/graph/cuthill_mckee_ordering.hpp +++ b/include/boost/graph/cuthill_mckee_ordering.hpp @@ -41,9 +41,9 @@ namespace boost { void finish_vertex(Vertex, Graph&) { using std::sort; - typedef typename property_traits::value_type DS; + typedef typename property_traits::value_type ds_type; - typedef indirect_cmp > Compare; + typedef indirect_cmp > Compare; Compare comp(degree); sort(Qptr->begin()+index_begin, Qptr->end(), comp); @@ -74,7 +74,7 @@ namespace boost { { //create queue, visitor...don't forget namespaces! - typedef typename property_traits::value_type DS; + typedef typename property_traits::value_type ds_type; typedef typename graph_traits::vertex_descriptor Vertex; typedef typename boost::sparse::sparse_ordering_queue queue; typedef typename detail::bfs_rcm_visitor Visitor; diff --git a/include/boost/graph/king_ordering.hpp b/include/boost/graph/king_ordering.hpp index c4ab9b00..dadd963f 100644 --- a/include/boost/graph/king_ordering.hpp +++ b/include/boost/graph/king_ordering.hpp @@ -193,18 +193,18 @@ namespace boost { ColorMap color, DegreeMap degree, VertexIndexMap index_map) { - typedef typename property_traits::value_type DS; + typedef typename property_traits::value_type ds_type; typedef typename property_traits::value_type ColorValue; typedef color_traits Color; typedef typename graph_traits::vertex_descriptor Vertex; - typedef iterator_property_map::iterator, VertexIndexMap, DS, DS&> PseudoDegreeMap; - typedef indirect_cmp > Compare; + typedef iterator_property_map::iterator, VertexIndexMap, ds_type, ds_type&> PseudoDegreeMap; + typedef indirect_cmp > Compare; typedef typename boost::sparse::sparse_ordering_queue queue; typedef typename detail::bfs_king_visitor, VertexIndexMap > Visitor; typedef typename graph_traits::vertices_size_type vertices_size_type; - std::vector pseudo_degree_vec(num_vertices(g)); + std::vector pseudo_degree_vec(num_vertices(g)); PseudoDegreeMap pseudo_degree(pseudo_degree_vec.begin(), index_map); typename graph_traits::vertex_iterator ui, ui_end; From bf7313572176ccad092f83c241be92d8e470cc65 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 27 Jun 2006 13:46:36 +0000 Subject: [PATCH 009/279] Fix parameter to add_vertices [SVN r34413] --- include/boost/graph/compressed_sparse_row_graph.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/graph/compressed_sparse_row_graph.hpp b/include/boost/graph/compressed_sparse_row_graph.hpp index f95884a5..853bfb20 100644 --- a/include/boost/graph/compressed_sparse_row_graph.hpp +++ b/include/boost/graph/compressed_sparse_row_graph.hpp @@ -352,7 +352,7 @@ add_vertex(BOOST_CSR_GRAPH_TYPE& g) { template inline Vertex -add_vertices(Vertex count, BOOST_CSR_GRAPH_TYPE& g) { +add_vertices(typename BOOST_CSR_GRAPH_TYPE::vertices_size_type count, BOOST_CSR_GRAPH_TYPE& g) { Vertex old_num_verts_plus_one = g.m_rowstart.size(); g.m_rowstart.resize(old_num_verts_plus_one + count, EdgeIndex(0)); return old_num_verts_plus_one - 1; From 1b3a6936a28b3809c8b564f2f9d942ce2b30dffd Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 2 Jul 2006 16:43:58 +0000 Subject: [PATCH 010/279] Don't build old viz parser unless explicitly asked for. (merge from head) [SVN r34442] --- build/Jamfile.v2 | 50 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 2b2bce64..acddfe81 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -4,24 +4,34 @@ project boost/graph : source-location ../src ; -lib bgl-viz - : graphviz_graph_lex - graphviz_digraph_lex - graphviz_graph_parser - graphviz_digraph_parser - read_graphviz_spirit.cpp - : YY_NO_UNISTD_H - ; +if [ modules.peek : GRAPHVIZ_PARSER ] +{ + lib bgl-viz + : + graphviz_graph_lex + graphviz_digraph_lex + graphviz_graph_parser + graphviz_digraph_parser + : YY_NO_UNISTD_H + ; -obj graphviz_graph_lex : graphviz_lex.ll - : bgl_undir_ GRAPHVIZ_DIRECTED=0 - graphviz_graph_parser ; -obj graphviz_graph_parser : graphviz_parser.yy - : bgl_undir_ GRAPHVIZ_DIRECTED=0 ; - - -obj graphviz_digraph_lex : graphviz_lex.ll - : bgl_dir_ GRAPHVIZ_DIRECTED=1 - graphviz_digraph_parser ; -obj graphviz_digraph_parser : graphviz_parser.yy - : bgl_dir_ GRAPHVIZ_DIRECTED=1 ; + obj graphviz_graph_lex : graphviz_lex.ll + : bgl_undir_ GRAPHVIZ_DIRECTED=0 + graphviz_graph_parser ; + obj graphviz_graph_parser : graphviz_parser.yy + : bgl_undir_ GRAPHVIZ_DIRECTED=0 ; + + + obj graphviz_digraph_lex : graphviz_lex.ll + : bgl_dir_ GRAPHVIZ_DIRECTED=1 + graphviz_digraph_parser ; + obj graphviz_digraph_parser : graphviz_parser.yy + : bgl_dir_ GRAPHVIZ_DIRECTED=1 ; +} +else +{ + lib bgl-viz + : + read_graphviz_spirit.cpp + ; +} From ce0f796b849405478a012cb5cebff2c65f547894 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 3 Jul 2006 18:03:34 +0000 Subject: [PATCH 011/279] Work around VC7 bugs [SVN r34456] --- include/boost/graph/adjacency_matrix.hpp | 3 ++- test/bidir_remove_edge.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/graph/adjacency_matrix.hpp b/include/boost/graph/adjacency_matrix.hpp index 34a16dd7..c9ac2a64 100644 --- a/include/boost/graph/adjacency_matrix.hpp +++ b/include/boost/graph/adjacency_matrix.hpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace boost { @@ -436,7 +437,7 @@ namespace boost { // graph type. Instead, use directedS, which also provides the // functionality required for a Bidirectional Graph (in_edges, // in_degree, etc.). - BOOST_STATIC_ASSERT(!(is_same::value)); + BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same::value)>::value); typedef typename boost::ct_if_t::type diff --git a/test/bidir_remove_edge.cpp b/test/bidir_remove_edge.cpp index 7fdbcd34..16c5aa7a 100644 --- a/test/bidir_remove_edge.cpp +++ b/test/bidir_remove_edge.cpp @@ -7,6 +7,7 @@ #include #include #include +using namespace boost; struct edge_prop { int weight; From 1035ddac5648f6134746eedd6e861a487b6c92fb Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 21 Jul 2006 20:25:50 +0000 Subject: [PATCH 012/279] Work around MSVC 7.0 bug [SVN r34656] --- include/boost/graph/adjacency_matrix.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/graph/adjacency_matrix.hpp b/include/boost/graph/adjacency_matrix.hpp index c9ac2a64..837c74dc 100644 --- a/include/boost/graph/adjacency_matrix.hpp +++ b/include/boost/graph/adjacency_matrix.hpp @@ -437,7 +437,9 @@ namespace boost { // graph type. Instead, use directedS, which also provides the // functionality required for a Bidirectional Graph (in_edges, // in_degree, etc.). +#if !defined(_MSC_VER) || _MSC_VER > 1300 BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same::value)>::value); +#endif typedef typename boost::ct_if_t::type From 5898cc5bae19f4d3617ca3ed7103604759ceeec7 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Mon, 24 Jul 2006 21:58:09 +0000 Subject: [PATCH 013/279] (merge from head) removed unnamed namespace reported by inspect tool [SVN r34716] --- include/boost/pending/stringtok.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/pending/stringtok.hpp b/include/boost/pending/stringtok.hpp index ae52e8db..a7065644 100644 --- a/include/boost/pending/stringtok.hpp +++ b/include/boost/pending/stringtok.hpp @@ -63,14 +63,14 @@ * This is the only part of the implementation that I don't like. * It can probably be improved upon by the reader... */ -namespace { + inline bool isws (char c, char const * const wstr) { using namespace std; return (strchr(wstr,c) != NULL); } -} + namespace boost { From 560f485326420011ba3d0d2d75035d88992792ac Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Tue, 25 Jul 2006 14:27:40 +0000 Subject: [PATCH 014/279] (merge from head) tab removal [SVN r34730] --- include/boost/graph/adj_list_serialize.hpp | 4 +- include/boost/graph/dominator_tree.hpp | 4 +- include/boost/graph/erdos_renyi_generator.hpp | 46 +- .../graph/maximum_cardinality_matching.hpp | 416 +++++++++--------- include/boost/graph/plod_generator.hpp | 8 +- 5 files changed, 239 insertions(+), 239 deletions(-) diff --git a/include/boost/graph/adj_list_serialize.hpp b/include/boost/graph/adj_list_serialize.hpp index f3cff37a..2a9508ea 100644 --- a/include/boost/graph/adj_list_serialize.hpp +++ b/include/boost/graph/adj_list_serialize.hpp @@ -22,7 +22,7 @@ namespace boost { namespace serialization { template + class VP, class EP, class GP, class EL> inline void save( Archive & ar, const boost::adjacency_list &graph, @@ -56,7 +56,7 @@ inline void save( template + class VP, class EP, class GP, class EL> inline void load( Archive & ar, boost::adjacency_list &graph, diff --git a/include/boost/graph/dominator_tree.hpp b/include/boost/graph/dominator_tree.hpp index c74ed5fb..d19ee4a4 100644 --- a/include/boost/graph/dominator_tree.hpp +++ b/include/boost/graph/dominator_tree.hpp @@ -452,8 +452,8 @@ namespace boost { typename std::set::iterator t; for (t = get(domMap, *vi).begin(); t != get(domMap, *vi).end(); ) { - typename std::set::iterator old_t = t; - ++t; // Done early because t may become invalid + typename std::set::iterator old_t = t; + ++t; // Done early because t may become invalid if (*old_t == *s) continue; if (get(domMap, *s).find(*old_t) != get(domMap, *s).end()) get(domMap, *vi).erase(old_t); diff --git a/include/boost/graph/erdos_renyi_generator.hpp b/include/boost/graph/erdos_renyi_generator.hpp index 00de8f0c..53ef09d6 100644 --- a/include/boost/graph/erdos_renyi_generator.hpp +++ b/include/boost/graph/erdos_renyi_generator.hpp @@ -123,16 +123,16 @@ namespace boost { sorted_erdos_renyi_iterator() : gen(), rand_vertex(0.5), n(0), allow_self_loops(false), - src((std::numeric_limits::max)()), tgt(0), prob(0) {} + src((std::numeric_limits::max)()), tgt(0), prob(0) {} sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n, - double prob = 0.0, + double prob = 0.0, bool allow_self_loops = false) : gen(), // The "1.0 - prob" in the next line is to work around a Boost.Random // (and TR1) bug in the specification of geometric_distribution. It // should be replaced by "prob" when the issue is fixed. rand_vertex(1.0 - prob), - n(n), allow_self_loops(allow_self_loops), src(0), tgt(0), prob(prob) + n(n), allow_self_loops(allow_self_loops), src(0), tgt(0), prob(prob) { this->gen.reset(new uniform_01(gen)); @@ -182,27 +182,27 @@ namespace boost { vertices_size_type increment = rand_vertex(*gen); tgt += increment; if (is_undirected) { - // Update src and tgt based on position of tgt - // Basically, we want the greatest src_increment such that (in \bbQ): - // src_increment * (src + allow_self_loops + src_increment - 1/2) <= tgt - // The result of the LHS of this, evaluated with the computed - // src_increment, is then subtracted from tgt - double src_minus_half = (src + allow_self_loops) - 0.5; - double disc = src_minus_half * src_minus_half + 2 * tgt; - double src_increment_fp = floor(sqrt(disc) - src_minus_half); - vertices_size_type src_increment = vertices_size_type(src_increment_fp); - if (src + src_increment >= n) { - src = n; - } else { - tgt -= (src + allow_self_loops) * src_increment + - src_increment * (src_increment - 1) / 2; - src += src_increment; - } + // Update src and tgt based on position of tgt + // Basically, we want the greatest src_increment such that (in \bbQ): + // src_increment * (src + allow_self_loops + src_increment - 1/2) <= tgt + // The result of the LHS of this, evaluated with the computed + // src_increment, is then subtracted from tgt + double src_minus_half = (src + allow_self_loops) - 0.5; + double disc = src_minus_half * src_minus_half + 2 * tgt; + double src_increment_fp = floor(sqrt(disc) - src_minus_half); + vertices_size_type src_increment = vertices_size_type(src_increment_fp); + if (src + src_increment >= n) { + src = n; + } else { + tgt -= (src + allow_self_loops) * src_increment + + src_increment * (src_increment - 1) / 2; + src += src_increment; + } } else { - // Number of out edge positions possible from each vertex in this graph - vertices_size_type possible_out_edges = n - (allow_self_loops ? 0 : 1); - src += (std::min)(n - src, tgt / possible_out_edges); - tgt %= possible_out_edges; + // Number of out edge positions possible from each vertex in this graph + vertices_size_type possible_out_edges = n - (allow_self_loops ? 0 : 1); + src += (std::min)(n - src, tgt / possible_out_edges); + tgt %= possible_out_edges; } // Set end of graph code so (src, tgt) will be the same as for the end // sorted_erdos_renyi_iterator diff --git a/include/boost/graph/maximum_cardinality_matching.hpp b/include/boost/graph/maximum_cardinality_matching.hpp index 79bd91d8..48cb053b 100755 --- a/include/boost/graph/maximum_cardinality_matching.hpp +++ b/include/boost/graph/maximum_cardinality_matching.hpp @@ -45,10 +45,10 @@ namespace boost for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) { - vertex_descriptor_t v = *vi; - if (get(mate,v) != graph_traits::null_vertex() + vertex_descriptor_t v = *vi; + if (get(mate,v) != graph_traits::null_vertex() && get(vm,v) < get(vm,get(mate,v))) - ++size_of_matching; + ++size_of_matching; } return size_of_matching; } @@ -76,10 +76,10 @@ namespace boost vertex_iterator_t vi, vi_end; for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) { - vertex_descriptor_t v = *vi; - if (get(mate,v) != graph_traits::null_vertex() + vertex_descriptor_t v = *vi; + if (get(mate,v) != graph_traits::null_vertex() && v != get(mate,get(mate,v))) - return false; + return false; } return true; } @@ -188,7 +188,7 @@ namespace boost { vertex_iterator_t vi, vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - mate[*vi] = get(arg_mate, *vi); + mate[*vi] = get(arg_mate, *vi); } @@ -206,25 +206,25 @@ namespace boost vertex_iterator_t vi, vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - { - vertex_descriptor_t u = *vi; - - origin[u] = u; - pred[u] = u; - ancestor_of_v[u] = 0; - ancestor_of_w[u] = 0; - ds.make_set(u); - - if (mate[u] == graph_traits::null_vertex()) - { - vertex_state[u] = graph::detail::V_EVEN; - out_edge_iterator_t ei, ei_end; - for(tie(ei,ei_end) = out_edges(u,g); ei != ei_end; ++ei) - even_edges.push_back( *ei ); - } - else - vertex_state[u] = graph::detail::V_UNREACHED; - } + { + vertex_descriptor_t u = *vi; + + origin[u] = u; + pred[u] = u; + ancestor_of_v[u] = 0; + ancestor_of_w[u] = 0; + ds.make_set(u); + + if (mate[u] == graph_traits::null_vertex()) + { + vertex_state[u] = graph::detail::V_EVEN; + out_edge_iterator_t ei, ei_end; + for(tie(ei,ei_end) = out_edges(u,g); ei != ei_end; ++ei) + even_edges.push_back( *ei ); + } + else + vertex_state[u] = graph::detail::V_UNREACHED; + } //end initializations @@ -234,99 +234,99 @@ namespace boost bool found_alternating_path = false; while(!even_edges.empty() && !found_alternating_path) - { - // since we push even edges onto the back of the list as - // they're discovered, taking them off the back will search - // for augmenting paths depth-first. - edge_descriptor_t current_edge = even_edges.back(); - even_edges.pop_back(); + { + // since we push even edges onto the back of the list as + // they're discovered, taking them off the back will search + // for augmenting paths depth-first. + edge_descriptor_t current_edge = even_edges.back(); + even_edges.pop_back(); - v = source(current_edge,g); - w = target(current_edge,g); - - vertex_descriptor_t v_prime = origin[ds.find_set(v)]; - vertex_descriptor_t w_prime = origin[ds.find_set(w)]; - - // because of the way we put all of the edges on the queue, - // v_prime should be labeled V_EVEN; the following is a - // little paranoid but it could happen... - if (vertex_state[v_prime] != graph::detail::V_EVEN) - { - std::swap(v_prime,w_prime); - std::swap(v,w); - } + v = source(current_edge,g); + w = target(current_edge,g); + + vertex_descriptor_t v_prime = origin[ds.find_set(v)]; + vertex_descriptor_t w_prime = origin[ds.find_set(w)]; + + // because of the way we put all of the edges on the queue, + // v_prime should be labeled V_EVEN; the following is a + // little paranoid but it could happen... + if (vertex_state[v_prime] != graph::detail::V_EVEN) + { + std::swap(v_prime,w_prime); + std::swap(v,w); + } - if (vertex_state[w_prime] == graph::detail::V_UNREACHED) - { - vertex_state[w_prime] = graph::detail::V_ODD; - vertex_state[mate[w_prime]] = graph::detail::V_EVEN; - out_edge_iterator_t ei, ei_end; - for( tie(ei,ei_end) = out_edges(mate[w_prime], g); ei != ei_end; ++ei) - even_edges.push_back(*ei); - pred[w_prime] = v; - } + if (vertex_state[w_prime] == graph::detail::V_UNREACHED) + { + vertex_state[w_prime] = graph::detail::V_ODD; + vertex_state[mate[w_prime]] = graph::detail::V_EVEN; + out_edge_iterator_t ei, ei_end; + for( tie(ei,ei_end) = out_edges(mate[w_prime], g); ei != ei_end; ++ei) + even_edges.push_back(*ei); + pred[w_prime] = v; + } //w_prime == v_prime can happen below if we get an edge that has been //shrunk into a blossom - else if (vertex_state[w_prime] == graph::detail::V_EVEN && w_prime != v_prime) - { - vertex_descriptor_t w_up = w_prime; - vertex_descriptor_t v_up = v_prime; - vertex_descriptor_t nearest_common_ancestor + else if (vertex_state[w_prime] == graph::detail::V_EVEN && w_prime != v_prime) + { + vertex_descriptor_t w_up = w_prime; + vertex_descriptor_t v_up = v_prime; + vertex_descriptor_t nearest_common_ancestor = graph_traits::null_vertex(); - w_free_ancestor = graph_traits::null_vertex(); - v_free_ancestor = graph_traits::null_vertex(); - - // We now need to distinguish between the case that - // w_prime and v_prime share an ancestor under the - // "parent" relation, in which case we've found a - // blossom and should shrink it, or the case that - // w_prime and v_prime both have distinct ancestors that - // are free, in which case we've found an alternating - // path between those two ancestors. + w_free_ancestor = graph_traits::null_vertex(); + v_free_ancestor = graph_traits::null_vertex(); + + // We now need to distinguish between the case that + // w_prime and v_prime share an ancestor under the + // "parent" relation, in which case we've found a + // blossom and should shrink it, or the case that + // w_prime and v_prime both have distinct ancestors that + // are free, in which case we've found an alternating + // path between those two ancestors. - ++timestamp; + ++timestamp; - while (nearest_common_ancestor == graph_traits::null_vertex() && - (v_free_ancestor == graph_traits::null_vertex() || - w_free_ancestor == graph_traits::null_vertex() - ) - ) - { - ancestor_of_w[w_up] = timestamp; - ancestor_of_v[v_up] = timestamp; + while (nearest_common_ancestor == graph_traits::null_vertex() && + (v_free_ancestor == graph_traits::null_vertex() || + w_free_ancestor == graph_traits::null_vertex() + ) + ) + { + ancestor_of_w[w_up] = timestamp; + ancestor_of_v[v_up] = timestamp; - if (w_free_ancestor == graph_traits::null_vertex()) - w_up = parent(w_up); - if (v_free_ancestor == graph_traits::null_vertex()) - v_up = parent(v_up); - - if (mate[v_up] == graph_traits::null_vertex()) - v_free_ancestor = v_up; - if (mate[w_up] == graph_traits::null_vertex()) - w_free_ancestor = w_up; - - if (ancestor_of_w[v_up] == timestamp) - nearest_common_ancestor = v_up; - else if (ancestor_of_v[w_up] == timestamp) - nearest_common_ancestor = w_up; - else if (v_free_ancestor == w_free_ancestor && - v_free_ancestor != graph_traits::null_vertex()) - nearest_common_ancestor = v_up; - } - - if (nearest_common_ancestor == graph_traits::null_vertex()) - found_alternating_path = true; //to break out of the loop - else - { - //shrink the blossom - link_and_set_bridges(w_prime, nearest_common_ancestor, std::make_pair(w,v)); - link_and_set_bridges(v_prime, nearest_common_ancestor, std::make_pair(v,w)); - } - } - } + if (w_free_ancestor == graph_traits::null_vertex()) + w_up = parent(w_up); + if (v_free_ancestor == graph_traits::null_vertex()) + v_up = parent(v_up); + + if (mate[v_up] == graph_traits::null_vertex()) + v_free_ancestor = v_up; + if (mate[w_up] == graph_traits::null_vertex()) + w_free_ancestor = w_up; + + if (ancestor_of_w[v_up] == timestamp) + nearest_common_ancestor = v_up; + else if (ancestor_of_v[w_up] == timestamp) + nearest_common_ancestor = w_up; + else if (v_free_ancestor == w_free_ancestor && + v_free_ancestor != graph_traits::null_vertex()) + nearest_common_ancestor = v_up; + } + + if (nearest_common_ancestor == graph_traits::null_vertex()) + found_alternating_path = true; //to break out of the loop + else + { + //shrink the blossom + link_and_set_bridges(w_prime, nearest_common_ancestor, std::make_pair(w,v)); + link_and_set_bridges(v_prime, nearest_common_ancestor, std::make_pair(v,w)); + } + } + } if (!found_alternating_path) - return false; + return false; // retrieve the augmenting path and put it in aug_path reversed_retrieve_augmenting_path(v, v_free_ancestor); @@ -335,14 +335,14 @@ namespace boost // augment the matching along aug_path vertex_descriptor_t a,b; while (!aug_path.empty()) - { - a = aug_path.front(); - aug_path.pop_front(); - b = aug_path.front(); - aug_path.pop_front(); - mate[a] = b; - mate[b] = a; - } + { + a = aug_path.front(); + aug_path.pop_front(); + b = aug_path.front(); + aug_path.pop_front(); + mate[a] = b; + mate[b] = a; + } return true; @@ -356,7 +356,7 @@ namespace boost { vertex_iterator_t vi,vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - put(pm, *vi, mate[*vi]); + put(pm, *vi, mate[*vi]); } @@ -367,7 +367,7 @@ namespace boost { vertex_iterator_t vi,vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - put(pm, *vi, vertex_state[origin[ds.find_set(*vi)]]); + put(pm, *vi, vertex_state[origin[ds.find_set(*vi)]]); } @@ -379,11 +379,11 @@ namespace boost { if (vertex_state[x] == graph::detail::V_EVEN && mate[x] != graph_traits::null_vertex()) - return mate[x]; + return mate[x]; else if (vertex_state[x] == graph::detail::V_ODD) - return origin[ds.find_set(pred[x])]; + return origin[ds.find_set(pred[x])]; else - return x; + return x; } @@ -391,21 +391,21 @@ namespace boost void link_and_set_bridges(vertex_descriptor_t x, vertex_descriptor_t stop_vertex, - vertex_pair_t the_bridge) + vertex_pair_t the_bridge) { for(vertex_descriptor_t v = x; v != stop_vertex; v = parent(v)) - { - ds.union_set(v, stop_vertex); - origin[ds.find_set(stop_vertex)] = stop_vertex; + { + ds.union_set(v, stop_vertex); + origin[ds.find_set(stop_vertex)] = stop_vertex; - if (vertex_state[v] == graph::detail::V_ODD) - { - bridge[v] = the_bridge; - out_edge_iterator_t oei, oei_end; - for(tie(oei, oei_end) = out_edges(v,g); oei != oei_end; ++oei) - even_edges.push_back(*oei); - } - } + if (vertex_state[v] == graph::detail::V_ODD) + { + bridge[v] = the_bridge; + out_edge_iterator_t oei, oei_end; + for(tie(oei, oei_end) = out_edges(v,g); oei != oei_end; ++oei) + even_edges.push_back(*oei); + } + } } @@ -426,19 +426,19 @@ namespace boost void retrieve_augmenting_path(vertex_descriptor_t v, vertex_descriptor_t w) { if (v == w) - aug_path.push_back(v); + aug_path.push_back(v); else if (vertex_state[v] == graph::detail::V_EVEN) - { - aug_path.push_back(v); - aug_path.push_back(mate[v]); - retrieve_augmenting_path(pred[mate[v]], w); - } + { + aug_path.push_back(v); + aug_path.push_back(mate[v]); + retrieve_augmenting_path(pred[mate[v]], w); + } else //vertex_state[v] == graph::detail::V_ODD - { - aug_path.push_back(v); - reversed_retrieve_augmenting_path(bridge[v].first, mate[v]); - retrieve_augmenting_path(bridge[v].second, w); - } + { + aug_path.push_back(v); + reversed_retrieve_augmenting_path(bridge[v].first, mate[v]); + retrieve_augmenting_path(bridge[v].second, w); + } } @@ -447,19 +447,19 @@ namespace boost { if (v == w) - aug_path.push_back(v); + aug_path.push_back(v); else if (vertex_state[v] == graph::detail::V_EVEN) - { - reversed_retrieve_augmenting_path(pred[mate[v]], w); - aug_path.push_back(mate[v]); - aug_path.push_back(v); - } + { + reversed_retrieve_augmenting_path(pred[mate[v]], w); + aug_path.push_back(mate[v]); + aug_path.push_back(v); + } else //vertex_state[v] == graph::detail::V_ODD - { - reversed_retrieve_augmenting_path(bridge[v].second, w); - retrieve_augmenting_path(bridge[v].first, mate[v]); - aug_path.push_back(v); - } + { + reversed_retrieve_augmenting_path(bridge[v].second, w); + retrieve_augmenting_path(bridge[v].first, mate[v]); + aug_path.push_back(v); + } } @@ -520,23 +520,23 @@ namespace boost { vertex_iterator_t vi, vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - put(mate, *vi, graph_traits::null_vertex()); + put(mate, *vi, graph_traits::null_vertex()); edge_iterator_t ei, ei_end; for( tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) - { - edge_descriptor_t e = *ei; - vertex_descriptor_t u = source(e,g); - vertex_descriptor_t v = target(e,g); - - if (get(mate,u) == get(mate,v)) - //only way equality can hold is if + { + edge_descriptor_t e = *ei; + vertex_descriptor_t u = source(e,g); + vertex_descriptor_t v = target(e,g); + + if (get(mate,u) == get(mate,v)) + //only way equality can hold is if // mate[u] == mate[v] == null_vertex - { - put(mate,u,v); - put(mate,v,u); - } - } + { + put(mate,u,v); + put(mate,v,u); + } + } } }; @@ -581,9 +581,9 @@ namespace boost less_than_by_degree(const Graph& g): m_g(g) {} bool operator() (const vertex_pair_t x, const vertex_pair_t y) { - return - out_degree(PairSelector::select_vertex(x), m_g) - < out_degree(PairSelector::select_vertex(y), m_g); + return + out_degree(PairSelector::select_vertex(x), m_g) + < out_degree(PairSelector::select_vertex(y), m_g); } private: const Graph& m_g; @@ -598,17 +598,17 @@ namespace boost directed_edges_vector_t edge_list; vertex_iterator_t vi, vi_end; for(tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) - put(mate, *vi, graph_traits::null_vertex()); + put(mate, *vi, graph_traits::null_vertex()); edge_iterator_t ei, ei_end; for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) - { - edge_descriptor_t e = *ei; - vertex_descriptor_t u = source(e,g); - vertex_descriptor_t v = target(e,g); - edge_list.push_back(std::make_pair(u,v)); - edge_list.push_back(std::make_pair(v,u)); - } + { + edge_descriptor_t e = *ei; + vertex_descriptor_t u = source(e,g); + vertex_descriptor_t v = target(e,g); + edge_list.push_back(std::make_pair(u,v)); + edge_list.push_back(std::make_pair(v,u)); + } //sort the edges by the degree of the target, then (using a //stable sort) by degree of the source @@ -619,14 +619,14 @@ namespace boost //construct the extra greedy matching for(typename directed_edges_vector_t::const_iterator itr = edge_list.begin(); itr != edge_list.end(); ++itr) - { - if (get(mate,itr->first) == get(mate,itr->second)) - //only way equality can hold is if mate[itr->first] == mate[itr->second] == null_vertex - { - put(mate, itr->first, itr->second); - put(mate, itr->second, itr->first); - } - } + { + if (get(mate,itr->first) == get(mate,itr->second)) + //only way equality can hold is if mate[itr->first] == mate[itr->second] == null_vertex + { + put(mate, itr->first, itr->second); + put(mate, itr->second, itr->first); + } + } } }; @@ -642,7 +642,7 @@ namespace boost { vertex_iterator_t vi, vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - put(mate, *vi, graph_traits::null_vertex()); + put(mate, *vi, graph_traits::null_vertex()); } }; @@ -666,22 +666,22 @@ namespace boost { public: odd_components_counter(SizeType& c_count): - m_count(c_count) + m_count(c_count) { - m_count = 0; + m_count = 0; } template void start_vertex(Vertex v, Graph&) { - addend = -1; + addend = -1; } template void discover_vertex(Vertex u, Graph&) { - addend *= -1; - m_count += addend; + addend *= -1; + m_count += addend; } protected: @@ -737,8 +737,8 @@ namespace boost : vertex_state(arg_vertex_state) { } template bool operator()(const Vertex& v) const { - BOOST_ASSERT(vertex_state); - return get(*vertex_state, v) != graph::detail::V_ODD; + BOOST_ASSERT(vertex_state); + return get(*vertex_state, v) != graph::detail::V_ODD; } VertexStateMap* vertex_state; }; @@ -763,7 +763,7 @@ namespace boost //first, make sure it's a valid matching if (!is_a_matching(g,mate,vm)) - return false; + return false; //We'll try to augment the matching once. This serves two //purposes: first, if we find some augmenting path, the matching @@ -775,7 +775,7 @@ namespace boost edmonds_augmenting_path_finder augmentor(g,mate,vm); if (augmentor.augment_matching()) - return false; + return false; std::vector vertex_state_vector(num_vertices(g)); vertex_to_int_map_t vertex_state(vertex_state_vector.begin(), vm); @@ -785,8 +785,8 @@ namespace boost v_size_t num_odd_vertices = 0; vertex_iterator_t vi, vi_end; for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) - if (vertex_state[*vi] == graph::detail::V_ODD) - ++num_odd_vertices; + if (vertex_state[*vi] == graph::detail::V_ODD) + ++num_odd_vertices; //count the number of connected components with odd cardinality //in the graph without graph::detail::V_ODD vertices @@ -798,9 +798,9 @@ namespace boost depth_first_search(fg, visitor(occ).vertex_index_map(vm)); if (2 * matching_size(g,mate,vm) == num_vertices(g) + num_odd_vertices - num_odd_components) - return true; + return true; else - return false; + return false; } }; @@ -808,11 +808,11 @@ namespace boost template class AugmentingPathFinder, - template class InitialMatchingFinder, - template class MatchingVerifier> + typename MateMap, + typename VertexIndexMap, + template class AugmentingPathFinder, + template class InitialMatchingFinder, + template class MatchingVerifier> bool matching(const Graph& g, MateMap mate, VertexIndexMap vm) { @@ -822,7 +822,7 @@ namespace boost bool not_maximum_yet = true; while(not_maximum_yet) { - not_maximum_yet = augmentor.augment_matching(); + not_maximum_yet = augmentor.augment_matching(); } augmentor.get_current_matching(mate); diff --git a/include/boost/graph/plod_generator.hpp b/include/boost/graph/plod_generator.hpp index d1ac2ada..077947ff 100644 --- a/include/boost/graph/plod_generator.hpp +++ b/include/boost/graph/plod_generator.hpp @@ -46,10 +46,10 @@ namespace boost { uniform_int x(0, n-1); for (std::size_t i = 0; i != n; ++i) { std::size_t xv = x(gen); - std::size_t degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); - if (degree != 0) { - out_degrees->push_back(std::make_pair(i, degree)); - } + std::size_t degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + if (degree != 0) { + out_degrees->push_back(std::make_pair(i, degree)); + } degrees_left += degree; } From 62cc164059a7916c8d4fa749b7d0b678b13e18b2 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Tue, 25 Jul 2006 23:12:38 +0000 Subject: [PATCH 015/279] (merge from head) fixed almost all issues reported by the inspect tool in boost/graph/ [SVN r34732] --- include/boost/graph/bc_clustering.hpp | 4 ++-- include/boost/graph/betweenness_centrality.hpp | 4 ++-- include/boost/graph/circle_layout.hpp | 4 ++-- include/boost/graph/compressed_sparse_row_graph.hpp | 4 ++-- include/boost/graph/detail/adjacency_list.hpp | 3 +-- include/boost/graph/detail/indexed_properties.hpp | 4 ++-- include/boost/graph/detail/read_graphviz_spirit.hpp | 4 ++-- include/boost/graph/dominator_tree.hpp | 8 ++++---- include/boost/graph/erdos_renyi_generator.hpp | 4 ++-- include/boost/graph/floyd_warshall_shortest.hpp | 4 ++-- include/boost/graph/fruchterman_reingold.hpp | 4 ++-- include/boost/graph/gursoy_atun_layout.hpp | 4 ++-- include/boost/graph/kamada_kawai_spring_layout.hpp | 4 ++-- include/boost/graph/page_rank.hpp | 4 ++-- include/boost/graph/plod_generator.hpp | 4 ++-- include/boost/graph/random_layout.hpp | 4 ++-- include/boost/graph/small_world_generator.hpp | 4 ++-- include/boost/graph/two_bit_color_map.hpp | 8 ++++---- 18 files changed, 39 insertions(+), 40 deletions(-) diff --git a/include/boost/graph/bc_clustering.hpp b/include/boost/graph/bc_clustering.hpp index c412ff5f..eb438c14 100644 --- a/include/boost/graph/bc_clustering.hpp +++ b/include/boost/graph/bc_clustering.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/betweenness_centrality.hpp b/include/boost/graph/betweenness_centrality.hpp index 53802634..890103f3 100644 --- a/include/boost/graph/betweenness_centrality.hpp +++ b/include/boost/graph/betweenness_centrality.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/circle_layout.hpp b/include/boost/graph/circle_layout.hpp index e601c532..b63f8165 100644 --- a/include/boost/graph/circle_layout.hpp +++ b/include/boost/graph/circle_layout.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/compressed_sparse_row_graph.hpp b/include/boost/graph/compressed_sparse_row_graph.hpp index 853bfb20..2d3e32d1 100644 --- a/include/boost/graph/compressed_sparse_row_graph.hpp +++ b/include/boost/graph/compressed_sparse_row_graph.hpp @@ -1,7 +1,7 @@ // Copyright 2005-2006 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jeremiah Willcock diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp index 7e1a508f..b42bdf7d 100644 --- a/include/boost/graph/detail/adjacency_list.hpp +++ b/include/boost/graph/detail/adjacency_list.hpp @@ -59,11 +59,10 @@ Note: it would be nice to merge some of the undirected and - bidirectional code... it is aweful similar. + bidirectional code... it is awful similar. */ - namespace boost { namespace detail { diff --git a/include/boost/graph/detail/indexed_properties.hpp b/include/boost/graph/detail/indexed_properties.hpp index c115a4b8..e5fdb71c 100644 --- a/include/boost/graph/detail/indexed_properties.hpp +++ b/include/boost/graph/detail/indexed_properties.hpp @@ -1,7 +1,7 @@ // Copyright 2005 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jeremiah Willcock diff --git a/include/boost/graph/detail/read_graphviz_spirit.hpp b/include/boost/graph/detail/read_graphviz_spirit.hpp index f7526237..56bd4f8c 100644 --- a/include/boost/graph/detail/read_graphviz_spirit.hpp +++ b/include/boost/graph/detail/read_graphviz_spirit.hpp @@ -1,7 +1,7 @@ // Copyright 2004-5 Trustees of Indiana University -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // diff --git a/include/boost/graph/dominator_tree.hpp b/include/boost/graph/dominator_tree.hpp index d19ee4a4..bb34bbe9 100644 --- a/include/boost/graph/dominator_tree.hpp +++ b/include/boost/graph/dominator_tree.hpp @@ -1,8 +1,8 @@ //======================================================================= // Copyright (C) 2005 Jong Soo Park // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= // Dominator tree computation @@ -217,8 +217,8 @@ namespace boost { * this function would be good for saving computations. * @pre Unreachable nodes must be masked as * graph_traits::null_vertex in parentMap. - * @pre Unreachable nodes must be maksed as - * std::numeric_limits::max() in dfnumMap. + * @pre Unreachable nodes must be masked as + * (std::numeric_limits::max)() in dfnumMap. * * @param domTreePredMap [out] : immediate dominator map (parent map * in dom. tree) diff --git a/include/boost/graph/erdos_renyi_generator.hpp b/include/boost/graph/erdos_renyi_generator.hpp index 53ef09d6..188a3f18 100644 --- a/include/boost/graph/erdos_renyi_generator.hpp +++ b/include/boost/graph/erdos_renyi_generator.hpp @@ -1,7 +1,7 @@ // Copyright 2004, 2005 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jeremiah Willcock diff --git a/include/boost/graph/floyd_warshall_shortest.hpp b/include/boost/graph/floyd_warshall_shortest.hpp index 50838b7c..69c3e7ed 100644 --- a/include/boost/graph/floyd_warshall_shortest.hpp +++ b/include/boost/graph/floyd_warshall_shortest.hpp @@ -1,7 +1,7 @@ // Copyright 2002 Rensselaer Polytechnic Institute -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Lauren Foutz diff --git a/include/boost/graph/fruchterman_reingold.hpp b/include/boost/graph/fruchterman_reingold.hpp index f3df55c8..a93d2665 100644 --- a/include/boost/graph/fruchterman_reingold.hpp +++ b/include/boost/graph/fruchterman_reingold.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/gursoy_atun_layout.hpp b/include/boost/graph/gursoy_atun_layout.hpp index fb82cb72..3b6ccc5e 100644 --- a/include/boost/graph/gursoy_atun_layout.hpp +++ b/include/boost/graph/gursoy_atun_layout.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jeremiah Willcock diff --git a/include/boost/graph/kamada_kawai_spring_layout.hpp b/include/boost/graph/kamada_kawai_spring_layout.hpp index 884cb036..b210d490 100644 --- a/include/boost/graph/kamada_kawai_spring_layout.hpp +++ b/include/boost/graph/kamada_kawai_spring_layout.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/page_rank.hpp b/include/boost/graph/page_rank.hpp index 78ae766d..8a4e1414 100644 --- a/include/boost/graph/page_rank.hpp +++ b/include/boost/graph/page_rank.hpp @@ -1,8 +1,8 @@ // Copyright 2004-5 The Trustees of Indiana University. // Copyright 2002 Brad King and Douglas Gregor -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/plod_generator.hpp b/include/boost/graph/plod_generator.hpp index 077947ff..a7800d04 100644 --- a/include/boost/graph/plod_generator.hpp +++ b/include/boost/graph/plod_generator.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/random_layout.hpp b/include/boost/graph/random_layout.hpp index 7f216122..b65950d6 100644 --- a/include/boost/graph/random_layout.hpp +++ b/include/boost/graph/random_layout.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/small_world_generator.hpp b/include/boost/graph/small_world_generator.hpp index 9cd62deb..ae266337 100644 --- a/include/boost/graph/small_world_generator.hpp +++ b/include/boost/graph/small_world_generator.hpp @@ -1,7 +1,7 @@ // Copyright 2004 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Douglas Gregor diff --git a/include/boost/graph/two_bit_color_map.hpp b/include/boost/graph/two_bit_color_map.hpp index efba3f46..3a6d6913 100644 --- a/include/boost/graph/two_bit_color_map.hpp +++ b/include/boost/graph/two_bit_color_map.hpp @@ -1,7 +1,7 @@ // Copyright (C) 2005-2006 The Trustees of Indiana University. -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jeremiah Willcock @@ -20,7 +20,7 @@ namespace boost { enum two_bit_color_type { two_bit_white = 0, - two_bit_gray = 1, + two_bit_gray = 1, two_bit_green = 2, two_bit_black = 3 }; @@ -29,7 +29,7 @@ template <> struct color_traits { static two_bit_color_type white() { return two_bit_white; } - static two_bit_color_type gray() { return two_bit_gray; } + static two_bit_color_type gray() { return two_bit_gray; } static two_bit_color_type green() { return two_bit_green; } static two_bit_color_type black() { return two_bit_black; } }; From 65f63fecc1f7498cd4f15fb51e9d76bfe108992a Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 3 Aug 2006 18:20:43 +0000 Subject: [PATCH 016/279] Documentation fixes, from David Baird [SVN r34810] --- doc/file_dependency_example.html | 17 +++++++++++++++-- doc/write-graphviz.html | 8 ++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/file_dependency_example.html b/doc/file_dependency_example.html index 683e26b4..995385db 100644 --- a/doc/file_dependency_example.html +++ b/doc/file_dependency_example.html @@ -85,7 +85,20 @@ href="../example/file_dependencies.cpp">examples/file_dependencies.cpp<

Graph Setup

-Here we show the construction of the graph. For simplicity we have +Here we show the construction of the graph. First, these are the required +header files: + +

+

+#include <iostream> // std::cout
+#include <utility> // std::pair
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/topological_sort.hpp>
+
+ +

+For simplicity we have constructed the graph "by-hand". A compilation system such as make would instead parse a Makefile to get the list of files and to set-up the dependencies. We use the @@ -131,7 +144,7 @@ the following sections. property<vertex_color_t, default_color_type>, property<edge_weight_t, int> > Graph; - Graph g(N, used_by, used_by + sizeof(used_by) / sizeof(Edge)); + Graph g(used_by, used_by + sizeof(used_by) / sizeof(Edge), N); typedef graph_traits<Graph>::vertex_descriptor Vertex; diff --git a/doc/write-graphviz.html b/doc/write-graphviz.html index 454bbc90..f0e5e9cb 100644 --- a/doc/write-graphviz.html +++ b/doc/write-graphviz.html @@ -234,6 +234,8 @@ This example demonstrates using BGL-graphviz interface to write a BGL graph into a graphviz format file.

+#include <boost/graph/graphviz.hpp>
+
 enum files_e { dax_h, yow_h, boz_h, zow_h, foo_cpp, 
                foo_o, bar_cpp, bar_o, libfoobar_a,
                zig_cpp, zig_o, zag_cpp, zag_o, 
@@ -265,13 +267,15 @@ int main(int,char*[])
   };
   const int nedges = sizeof(used_by)/sizeof(Edge);
   int weights[nedges];
-  fill(weights, weights + nedges, 1);
+  std::fill(weights, weights + nedges, 1);
+
+  using namespace boost;
 
   typedef adjacency_list< vecS, vecS, directedS, 
       property< vertex_color_t, default_color_type >,
       property< edge_weight_t, int >
     > Graph;
-  Graph g(N, used_by, used_by + nedges, weights);
+  Graph g(used_by, used_by + nedges, weights, N);
 
   write_graphviz(std::cout, g, make_label_writer(name));
 }

From 9badc9484574065270620a45e6a2a93b4e335ad8 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Thu, 3 Aug 2006 18:29:44 +0000
Subject: [PATCH 017/279] Give bundle_property_map a default constructor

[SVN r34811]
---
 include/boost/graph/properties.hpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/boost/graph/properties.hpp b/include/boost/graph/properties.hpp
index 5a281c15..5f10d04c 100644
--- a/include/boost/graph/properties.hpp
+++ b/include/boost/graph/properties.hpp
@@ -332,7 +332,8 @@ namespace boost {
     typedef T value_type;
     typedef T& reference;
     typedef lvalue_property_map_tag category;
-
+ 
+    bundle_property_map() { }
     bundle_property_map(Graph* g_, T Bundle::* pm_) : g(g_), pm(pm_) {}
 
     reference operator[](key_type k) const { return (*g)[k].*pm; }

From ec2dcfddbb19901942714048f7cd33e51b6d8ebb Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Thu, 10 Aug 2006 13:41:30 +0000
Subject: [PATCH 018/279] Move initialize_vertex after setting properties

[SVN r34861]
---
 include/boost/graph/dijkstra_shortest_paths.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/boost/graph/dijkstra_shortest_paths.hpp b/include/boost/graph/dijkstra_shortest_paths.hpp
index ef6b824c..2e81ada8 100644
--- a/include/boost/graph/dijkstra_shortest_paths.hpp
+++ b/include/boost/graph/dijkstra_shortest_paths.hpp
@@ -247,10 +247,10 @@ namespace boost {
     typedef color_traits Color;
     typename graph_traits::vertex_iterator ui, ui_end;
     for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
-      vis.initialize_vertex(*ui, g);
       put(distance, *ui, inf);
       put(predecessor, *ui, *ui);
       put(color, *ui, Color::white());
+      vis.initialize_vertex(*ui, g);
     }
     put(distance, s, zero);
 

From ac847ac7151749f4496055fc38a9224a86fe6f29 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Thu, 10 Aug 2006 13:45:12 +0000
Subject: [PATCH 019/279] Move initialize_vertex before setting properties

[SVN r34862]
---
 include/boost/graph/dijkstra_shortest_paths.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/boost/graph/dijkstra_shortest_paths.hpp b/include/boost/graph/dijkstra_shortest_paths.hpp
index 2e81ada8..ef6b824c 100644
--- a/include/boost/graph/dijkstra_shortest_paths.hpp
+++ b/include/boost/graph/dijkstra_shortest_paths.hpp
@@ -247,10 +247,10 @@ namespace boost {
     typedef color_traits Color;
     typename graph_traits::vertex_iterator ui, ui_end;
     for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
+      vis.initialize_vertex(*ui, g);
       put(distance, *ui, inf);
       put(predecessor, *ui, *ui);
       put(color, *ui, Color::white());
-      vis.initialize_vertex(*ui, g);
     }
     put(distance, s, zero);
 

From 3a07fe7c22a3c9eb0f7864bc6a71fc2e2c53233b Mon Sep 17 00:00:00 2001
From: Daniel James 
Date: Tue, 29 Aug 2006 20:55:58 +0000
Subject: [PATCH 020/279] Remove tabs.

[SVN r34994]
---
 example/kevin-bacon2.cpp      |  4 +--
 test/csr_graph_test.cpp       | 12 +++----
 test/dominator_tree_test.cpp  | 10 +++---
 test/matching_test.cpp        | 60 +++++++++++++++++------------------
 test/random_matching_test.cpp | 34 ++++++++++----------
 5 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/example/kevin-bacon2.cpp b/example/kevin-bacon2.cpp
index 8fa86595..719d24c6 100644
--- a/example/kevin-bacon2.cpp
+++ b/example/kevin-bacon2.cpp
@@ -38,7 +38,7 @@ struct edge_properties {
 using namespace boost;
 
 typedef adjacency_list Graph;
+               vertex_properties, edge_properties> Graph;
 typedef graph_traits::vertex_descriptor Vertex;
 typedef graph_traits::edge_descriptor Edge;
 
@@ -84,7 +84,7 @@ int main()
 
   for (tie(i, end) = vertices(g); i != end; ++i)
     std::cout << g[*i].name << " has a Bacon number of "
-	      << bacon_number[*i] << std::endl;
+          << bacon_number[*i] << std::endl;
 
   return 0;
 }
diff --git a/test/csr_graph_test.cpp b/test/csr_graph_test.cpp
index c94a7e6b..56a5bfb8 100644
--- a/test/csr_graph_test.cpp
+++ b/test/csr_graph_test.cpp
@@ -200,8 +200,8 @@ void test(const OrigGraph& g)
     if (i % 13 == 0) check_consistency(g4);
   }
   assert_graphs_equal(g3, boost::identity_property_map(),
-		      g4, boost::identity_property_map(),
-		      boost::identity_property_map());
+                      g4, boost::identity_property_map(),
+                      boost::identity_property_map());
 
   // Check edge_from_index (and implicitly the edge_index property map) for
   // each edge in g2
@@ -241,11 +241,11 @@ void test(const OrigGraph& g)
       BOOST_CHECK(source(edge_info.first, g2) == *vi);
       BOOST_CHECK(target(edge_info.first, g2) == tgtd);
       std::pair er =
-	edge_range(*vi, tgtd, g2);
+        edge_range(*vi, tgtd, g2);
       BOOST_CHECK(er.first != er.second);
       for (; er.first != er.second; ++er.first) {
-	BOOST_CHECK(source(*er.first, g2) == *vi);
-	BOOST_CHECK(target(*er.first, g2) == tgtd);
+        BOOST_CHECK(source(*er.first, g2) == *vi);
+        BOOST_CHECK(target(*er.first, g2) == tgtd);
       }
     }
 
@@ -255,7 +255,7 @@ void test(const OrigGraph& g)
     CSRGraphT::out_edge_iterator oei2, oei2_end;
     for (boost::tie(oei2, oei_end) = out_edges(*vi, g2); oei2 != oei_end; ++oei2) {
       if (target(*oei2, g2) == test_vertex)
-	++edge_count;
+        ++edge_count;
     }
 
     // Test edge and edge_range on an edge that may not be present
diff --git a/test/dominator_tree_test.cpp b/test/dominator_tree_test.cpp
index a46831cb..99604118 100755
--- a/test/dominator_tree_test.cpp
+++ b/test/dominator_tree_test.cpp
@@ -26,10 +26,10 @@ struct DominatorCorrectnessTestSet
 using namespace boost;
 
 typedef adjacency_list<
-	listS,
-	listS,
-	bidirectionalS,
-	property, no_property> G;
+    listS,
+    listS,
+    bidirectionalS,
+    property, no_property> G;
 
 int test_main(int, char*[])
 {
@@ -209,7 +209,7 @@ int test_main(int, char*[])
       G g(
           testSet[i].edges, testSet[i].edges + testSet[i].numOfEdges,
           numOfVertices);
-		
+
       typedef graph_traits::vertex_descriptor Vertex;
       typedef property_map::type IndexMap;
       typedef
diff --git a/test/matching_test.cpp b/test/matching_test.cpp
index b6f4082a..9badb66d 100755
--- a/test/matching_test.cpp
+++ b/test/matching_test.cpp
@@ -21,17 +21,17 @@
 using namespace boost;
 
 typedef adjacency_list >  undirected_graph;
+                       vecS, 
+                       undirectedS, 
+                       property >  undirected_graph;
 
 typedef adjacency_list >  undirected_list_graph;
+                       listS,
+                       undirectedS,
+                       property >  undirected_list_graph;
 
 typedef adjacency_matrix > undirected_adjacency_matrix_graph;
+                         property > undirected_adjacency_matrix_graph;
 
 
 template 
@@ -72,7 +72,7 @@ void complete_graph(Graph& g, int n)
       wi = vi;
       ++wi;
       for(; wi != vi_end; ++wi)
-	add_edge(*vi,*wi,g);      
+        add_edge(*vi,*wi,g);      
     }
 }
 
@@ -104,10 +104,10 @@ void gabows_graph(Graph& g, int n)
       vi = ui;
       ++vi;
       while (vi != halfway)
-	{
-	  add_edge(*ui,*vi,g);
-	  ++vi;
-	}
+        {
+          add_edge(*ui,*vi,g);
+          ++vi;
+        }
       ++ui;
     }
 
@@ -160,7 +160,7 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (!edmonds_result)
     {
       std::cout << "Verifier reporting a problem finding a perfect matching on" << std::endl
-		<< "the complete graph using " << graph_name << std::endl;
+                << "the complete graph using " << graph_name << std::endl;
       all_tests_passed = false;
     }
   
@@ -174,7 +174,7 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (!greedy_result)
     {
       std::cout << "Verifier reporting a problem finding a greedy matching on" << std::endl
-		<< "the complete graph using " << graph_name << std::endl;
+                << "the complete graph using " << graph_name << std::endl;
       all_tests_passed = false;
     }
 
@@ -188,7 +188,7 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (!extra_greedy_result)
     {
       std::cout << "Verifier reporting a problem finding an extra greedy matching on" << std::endl
-		<< "the complete graph using " << graph_name << std::endl;
+                << "the complete graph using " << graph_name << std::endl;
       all_tests_passed = false;
     }
 
@@ -202,8 +202,8 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (edmonds_result && !edmonds_sanity_check)
     {
       std::cout << "Verifier okayed edmonds' algorithm on the complete graph, but" << std::endl
-		<< "the matching returned either wasn't a valid matching or wasn't" << std::endl
-		<< "actually a maximum cardinality matching." << std::endl;
+                << "the matching returned either wasn't a valid matching or wasn't" << std::endl
+                << "actually a maximum cardinality matching." << std::endl;
       all_tests_passed = false;
     }
 
@@ -214,8 +214,8 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (greedy_result && !greedy_sanity_check)
     {
       std::cout << "Verifier okayed greedy algorithm on the complete graph, but" << std::endl
-		<< "the matching returned either wasn't a valid matching or wasn't" << std::endl
-		<< "actually a maximum cardinality matching." << std::endl;
+                << "the matching returned either wasn't a valid matching or wasn't" << std::endl
+                << "actually a maximum cardinality matching." << std::endl;
       all_tests_passed = false;
     }
   
@@ -226,8 +226,8 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (extra_greedy_result && !extra_greedy_sanity_check)
     {
       std::cout << "Verifier okayed extra greedy algorithm on the complete graph, but" << std::endl
-		<< "the matching returned either wasn't a valid matching or wasn't" << std::endl
-		<< "actually a maximum cardinality matching." << std::endl;
+                << "the matching returned either wasn't a valid matching or wasn't" << std::endl
+                << "actually a maximum cardinality matching." << std::endl;
       all_tests_passed = false;
     }
   
@@ -268,7 +268,7 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (!gabows_graph_result)
     {
       std::cout << "Problem on Gabow's Graph with " << graph_name << ":" << std::endl
-		<< "   Verifier reporting a maximum cardinality matching not found." << std::endl;
+                << "   Verifier reporting a maximum cardinality matching not found." << std::endl;
       all_tests_passed = false;
     }
   
@@ -276,9 +276,9 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
   if (gabows_graph_result && matching_size(h,gabow_mate) != num_v)
     {
       std::cout << "Problem on Gabow's Graph with " << graph_name << ":" << std::endl
-		<< "   Verifier reported a maximum cardinality matching found," << std::endl
-		<< "   but matching size is " << matching_size(h,gabow_mate)
-		<< " when it should be " << num_v << std::endl;
+                << "   Verifier reported a maximum cardinality matching found," << std::endl
+                << "   but matching size is " << matching_size(h,gabow_mate)
+                << " when it should be " << num_v << std::endl;
       all_tests_passed = false;
     }
 
@@ -298,11 +298,11 @@ void matching_test(std::size_t num_v, const std::string& graph_name)
       vertex_descriptor_t u = random_vertex(j,rand_num);
       vertex_descriptor_t v = random_vertex(j,rand_num);
       if (u != v)
-	{
-	  tie(tuples::ignore, success) = add_edge(u, v, j);
-	  if (success)
-	    num_edges++;
-	}
+        {
+          tie(tuples::ignore, success) = add_edge(u, v, j);
+          if (success)
+            num_edges++;
+        }
     }
 
   mate_t random_mate(double_num_v);
diff --git a/test/random_matching_test.cpp b/test/random_matching_test.cpp
index f62afde4..b63d9020 100755
--- a/test/random_matching_test.cpp
+++ b/test/random_matching_test.cpp
@@ -19,9 +19,9 @@
 using namespace boost;
 
 typedef adjacency_list >  undirected_graph;
+                       vecS, 
+                       undirectedS, 
+                       property >  undirected_graph;
 
 typedef property_map::type vertex_index_map_t;
 typedef vector_property_map::vertex_descriptor, vertex_index_map_t > mate_t;
@@ -35,7 +35,7 @@ int main(int argc, char** argv)
   if (argc < 3)
     {
       std::cout << "Usage: " << argv[0] << " n m" << std::endl
-		<< "Tests the checked matching on a random graph w/ n vertices and m edges" << std::endl;
+                << "Tests the checked matching on a random graph w/ n vertices and m edges" << std::endl;
       exit(-1);
     }
   
@@ -58,15 +58,15 @@ int main(int argc, char** argv)
       vertex_descriptor_t u = random_vertex(g,rand_num);
       vertex_descriptor_t v = random_vertex(g,rand_num);
       if (u != v)
-	{
-	  if (!edge(u,v,g).second)
-	    tie(tuples::ignore, success) = add_edge(u, v, g);
-	  else
-	    success = false;
+        {
+          if (!edge(u,v,g).second)
+            tie(tuples::ignore, success) = add_edge(u, v, g);
+          else
+            success = false;
 
-	  if (success)
-	    num_edges++;
-	}
+          if (success)
+            num_edges++;
+        }
     }
 
   mate_t mate(n);
@@ -80,15 +80,15 @@ int main(int argc, char** argv)
       typedef graph_traits::edge_iterator edge_iterator_t;
       edge_iterator_t ei,ei_end;
       for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
-	std:: cout << *ei << ", ";
+        std:: cout << *ei << ", ";
       std::cout << std::endl;
       
       std::cout << "Matching is: ";
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
-	if (mate[*vi] != graph_traits::null_vertex() &&
-	    *vi < mate[*vi])
-	  std::cout << "{" << *vi << "," << mate[*vi] << "}, ";
+        if (mate[*vi] != graph_traits::null_vertex() &&
+            *vi < mate[*vi])
+          std::cout << "{" << *vi << "," << mate[*vi] << "}, ";
       std::cout << std::endl;
     }
 
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
 
   if (matching_size(g,mate) > matching_size(g,greedy_mate) &&
       maximum_cardinality_matching_verifier::verify_matching(g,greedy_mate,get(vertex_index,g)))
-	std::cout << "TEST 3 FAILED!!!" << std::endl;
+        std::cout << "TEST 3 FAILED!!!" << std::endl;
 
   return 0;
 }

From bc49236ccc30a55a801a812a3f597f4bded22149 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Wed, 13 Sep 2006 20:41:28 +0000
Subject: [PATCH 021/279] Work around MSVC 6, 7 bug

[SVN r35099]
---
 include/boost/graph/adjacency_matrix.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/boost/graph/adjacency_matrix.hpp b/include/boost/graph/adjacency_matrix.hpp
index 837c74dc..5be3829f 100644
--- a/include/boost/graph/adjacency_matrix.hpp
+++ b/include/boost/graph/adjacency_matrix.hpp
@@ -474,11 +474,13 @@ namespace boost {
     typedef adjacency_matrix_traits Traits;
     
   public:
+#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
     // The bidirectionalS tag is not allowed with the adjacency_matrix
     // graph type. Instead, use directedS, which also provides the
     // functionality required for a Bidirectional Graph (in_edges,
     // in_degree, etc.).
     BOOST_STATIC_ASSERT(!(is_same::value));
+#endif
 
 #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
     typedef typename detail::retag_property_list::type

From f4b0928c2d55f7a5d7032616948d380d046df94d Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Wed, 13 Sep 2006 20:49:10 +0000
Subject: [PATCH 022/279] Work around Sun CC bug

[SVN r35100]
---
 test/csr_graph_test.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/csr_graph_test.cpp b/test/csr_graph_test.cpp
index 56a5bfb8..d301c800 100644
--- a/test/csr_graph_test.cpp
+++ b/test/csr_graph_test.cpp
@@ -44,6 +44,8 @@ template 
 void assert_graphs_equal(const G1& g1, const VI1& vi1,
                          const G2& g2, const VI2& vi2,
                          const IsomorphismMap& iso) {
+  using boost::out_degree;
+
   BOOST_CHECK (num_vertices(g1) == num_vertices(g2));
   BOOST_CHECK (num_edges(g1) == num_edges(g2));
 

From a03ed0e26d4a728151897c8d4243693f88e7491b Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Wed, 20 Sep 2006 13:55:16 +0000
Subject: [PATCH 023/279] Work around compiler optimizer bugs

[SVN r35225]
---
 build/Jamfile.v2 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/build/Jamfile.v2 b/build/Jamfile.v2
index acddfe81..d6318df8 100644
--- a/build/Jamfile.v2
+++ b/build/Jamfile.v2
@@ -33,5 +33,11 @@ else
     lib bgl-viz
         :
         read_graphviz_spirit.cpp
+        :
+        # # Intel compiler ICEs if we turn optimization on
+        intel-vc71-win-9.1:off
+        # Without these flags, MSVC 7.1 and 8.0 crash
+        msvc-7.1:-GR-
+        msvc-8.0:-GR-
         ;
 }

From d34d447b6892b14d79a9361abd48326fb22ad167 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Thu, 21 Sep 2006 17:02:14 +0000
Subject: [PATCH 024/279] Test and fix serialization code

[SVN r35257]
---
 include/boost/graph/adj_list_serialize.hpp    | 13 +++-
 include/boost/graph/detail/adjacency_list.hpp | 12 +++-
 test/Jamfile                                  |  4 ++
 test/Jamfile.v2                               |  4 ++
 test/csr_graph_test.cpp                       |  6 +-
 test/serialize.cpp                            | 63 +++++++++++++++++++
 6 files changed, 96 insertions(+), 6 deletions(-)
 create mode 100644 test/serialize.cpp

diff --git a/include/boost/graph/adj_list_serialize.hpp b/include/boost/graph/adj_list_serialize.hpp
index 2a9508ea..cbd3b434 100644
--- a/include/boost/graph/adj_list_serialize.hpp
+++ b/include/boost/graph/adj_list_serialize.hpp
@@ -21,6 +21,15 @@
 namespace boost { 
 namespace serialization {
 
+// Turn off tracking for adjacency_list. It's not polymorphic, and we
+// need to do this to enable saving of non-const adjacency lists.
+template
+struct tracking_level > {
+  typedef mpl::integral_c_tag tag;
+  typedef mpl::int_ type;
+  BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value);
+};
+
 template
 inline void save(
@@ -76,7 +85,7 @@ inline void load(
   while(V-- > 0){
     Vertex v = add_vertex(graph);
     verts[i++] = v;
-    ar >> graph[v];
+    ar >> get(vertex_all_t(), graph, v);
   }
   while(E-- > 0){
     int u; int v;
@@ -84,7 +93,7 @@ inline void load(
     ar >> BOOST_SERIALIZATION_NVP(v);
     Edge e; bool inserted;
     tie(e,inserted) = add_edge(verts[u], verts[v], graph);
-    ar >> graph[e];
+    ar >> get(edge_all_t(), graph, e);
   }
 }
 
diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp
index b42bdf7d..46b4ea81 100644
--- a/include/boost/graph/detail/adjacency_list.hpp
+++ b/include/boost/graph/detail/adjacency_list.hpp
@@ -1717,12 +1717,22 @@ namespace boost {
       return detail::get_dispatch(g, p, Kind());
     }
 
+    template 
+    inline
+    typename boost::property_traits<
+      typename boost::property_map::type
+    >::reference
+    get(Property p, adj_list_helper& g, const Key& key) {
+      return get(get(p, g), key);
+    }
+
     template 
     inline
     typename boost::property_traits<
       typename boost::property_map::const_type
-    >::value_type
+    >::reference
     get(Property p, const adj_list_helper& g, const Key& key) {
       return get(get(p, g), key);
     }
diff --git a/test/Jamfile b/test/Jamfile
index 78cdfb02..46c9ca6f 100644
--- a/test/Jamfile
+++ b/test/Jamfile
@@ -72,6 +72,10 @@ test-suite graph :
     [ compile reverse_graph_cc.cpp : $(BOOST_ROOT) ] 
 
     [ run sequential_vertex_coloring.cpp : : : $(BOOST_ROOT) ]
+  
+    [ run serialize.cpp 
+          @boost/libs/serialization/build/boost_serialization
+      : : : $(BOOST_ROOT) ]
 
     [ run subgraph.cpp : : : $(BOOST_ROOT) ]
 
diff --git a/test/Jamfile.v2 b/test/Jamfile.v2
index 5ef8179f..80b1becd 100644
--- a/test/Jamfile.v2
+++ b/test/Jamfile.v2
@@ -59,6 +59,10 @@ test-suite graph_test :
 
     [ run layout_test.cpp : : : always_show_run_output intel:off ]
 
+    [ run serialize.cpp 
+          ../../serialization/build//boost_serialization
+      : : : ]
+
     [ compile reverse_graph_cc.cpp ] 
 
     [ run sequential_vertex_coloring.cpp ]
diff --git a/test/csr_graph_test.cpp b/test/csr_graph_test.cpp
index d301c800..5afc6a86 100644
--- a/test/csr_graph_test.cpp
+++ b/test/csr_graph_test.cpp
@@ -370,9 +370,9 @@ int test_main(int argc, char* argv[])
     CSRGraphT g;
     test(g);
   }
-  test(1000, 0.05, seed);
-  test(1000, 0.0, seed);
-  test(1000, 0.1, seed);
+  //  test(1000, 0.05, seed);
+  //  test(1000, 0.0, seed);
+  //  test(1000, 0.1, seed);
   test(1000, 0.001, seed);
   test(1000, 0.0005, seed);
   {
diff --git a/test/serialize.cpp b/test/serialize.cpp
new file mode 100644
index 00000000..32eaeea8
--- /dev/null
+++ b/test/serialize.cpp
@@ -0,0 +1,63 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct vertex_properties {
+  std::string name;
+
+  template
+  void serialize(Archive & ar, const unsigned int version) {
+    ar & name;
+  }  
+};
+
+struct edge_properties {
+  std::string name;
+
+  template
+  void serialize(Archive & ar, const unsigned int version) {
+    ar & name;
+  }  
+};
+
+using namespace boost;
+
+typedef adjacency_list Graph;
+
+
+typedef adjacency_list Graph_no_edge_property;
+
+int main()
+{
+  {
+    std::ofstream ofs("./kevin-bacon2.dat");
+    archive::text_oarchive oa(ofs);
+    Graph g;
+    oa << g;
+
+    Graph_no_edge_property g_n;
+    oa << g_n;
+  }
+
+  {
+    std::ifstream ifs("./kevin-bacon2.dat");
+    archive::text_iarchive ia(ifs);
+    Graph g;
+    ia >> g;
+
+    Graph_no_edge_property g_n;
+    ia >> g_n;
+  }
+  return 0;
+}

From 58e287d1158045a9b3a373711ec532a486a53f9b Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Tue, 26 Sep 2006 12:52:08 +0000
Subject: [PATCH 025/279] Do the DLL import/export dance for the GraphViz
 reader.

[SVN r35335]
---
 build/Jamfile.v2                 |  2 ++
 include/boost/graph/graphviz.hpp | 15 +++++++++++++++
 src/read_graphviz_spirit.cpp     |  3 +++
 3 files changed, 20 insertions(+)

diff --git a/build/Jamfile.v2 b/build/Jamfile.v2
index d6318df8..3f5d9c3a 100644
--- a/build/Jamfile.v2
+++ b/build/Jamfile.v2
@@ -34,6 +34,8 @@ else
         :
         read_graphviz_spirit.cpp
         :
+        BOOST_GRAPH_NO_LIB=1
+        shared:BOOST_GRAPH_DYN_LINK=1
         # # Intel compiler ICEs if we turn optimization on
         intel-vc71-win-9.1:off
         # Without these flags, MSVC 7.1 and 8.0 crash
diff --git a/include/boost/graph/graphviz.hpp b/include/boost/graph/graphviz.hpp
index 71a304b2..840c0d79 100644
--- a/include/boost/graph/graphviz.hpp
+++ b/include/boost/graph/graphviz.hpp
@@ -24,6 +24,20 @@
 #include 
 #include 
 
+#ifdef BOOST_HAS_DECLSPEC
+#  if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK)
+#    ifdef BOOST_GRAPH_SOURCE
+#      define BOOST_GRAPH_DECL __declspec(dllexport)
+#    else
+#      define BOOST_GRAPH_DECL __declspec(dllimport)
+#    endif  // BOOST_GRAPH_SOURCE
+#  endif  // DYN_LINK
+#endif  // BOOST_HAS_DECLSPEC
+
+#ifndef BOOST_GRAPH_DECL
+#  define BOOST_GRAPH_DECL
+#endif
+
 namespace boost {
 
   template 
@@ -734,6 +748,7 @@ class mutate_graph_impl : public mutate_graph
   std::map bgl_edges;
 };
 
+BOOST_GRAPH_DECL
 bool read_graphviz(std::istream& in, mutate_graph& graph);
 
 } } // end namespace detail::graph
diff --git a/src/read_graphviz_spirit.cpp b/src/read_graphviz_spirit.cpp
index 2f51418f..c5fe90a7 100644
--- a/src/read_graphviz_spirit.cpp
+++ b/src/read_graphviz_spirit.cpp
@@ -20,6 +20,8 @@
 // Authors: Ronald Garcia and Douglas Gregor
 //
 
+#define BOOST_GRAPH_SOURCE
+
 #ifndef BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
 #  define BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
 #endif
@@ -27,6 +29,7 @@
 
 namespace boost { namespace detail { namespace graph { 
 
+BOOST_GRAPH_DECL
 bool read_graphviz(std::istream& in, mutate_graph& graph) 
 {
   using namespace boost;

From bf2f7f86faaa2c237021b4699ca9601963413509 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Fri, 29 Sep 2006 15:30:07 +0000
Subject: [PATCH 026/279] Fix parameter name

[SVN r35419]
---
 doc/graph_coloring.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/graph_coloring.html b/doc/graph_coloring.html
index 067d191c..ac496a61 100644
--- a/doc/graph_coloring.html
+++ b/doc/graph_coloring.html
@@ -121,7 +121,7 @@ namespace boost {
   void 
   smallest_last_ordering(const VertexListGraph& G, Order order, 
                          Degree degree, Marker marker, 
-                         BucketSorter& bucket_sorter) {
+                         BucketSorter& degree_buckets) {
     typedef typename graph_traits<VertexListGraph> GraphTraits;
 
     typedef typename GraphTraits::vertex_descriptor Vertex;

From 344dd6b155408ffeed99f5a84a6cb842ec1e33c5 Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Fri, 29 Sep 2006 15:33:12 +0000
Subject: [PATCH 027/279] Fix handling of empty graphs

[SVN r35420]
---
 include/boost/graph/depth_first_search.hpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/boost/graph/depth_first_search.hpp b/include/boost/graph/depth_first_search.hpp
index 588aa83f..6a0abb9a 100644
--- a/include/boost/graph/depth_first_search.hpp
+++ b/include/boost/graph/depth_first_search.hpp
@@ -214,6 +214,9 @@ namespace boost {
   void
   depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color)
   {
+    if (vertices(g).first == vertices(g).second)
+      return;
+
     depth_first_search(g, vis, color, *vertices(g).first);
   }
 
@@ -321,6 +324,8 @@ namespace boost {
   {
     typedef typename property_value< bgl_named_params,
       vertex_color_t>::type C;
+    if (vertices(g).first == vertices(g).second)
+      return;
     detail::dfs_dispatch::apply
       (g,
        choose_param(get_param(params, graph_visitor),

From b0474f1dd998ae159f32d4135b2fa7bb08a6538e Mon Sep 17 00:00:00 2001
From: Douglas Gregor 
Date: Fri, 3 Nov 2006 18:55:11 +0000
Subject: [PATCH 028/279] Clear up copyright/license problems

[SVN r35824]
---
 doc/AStarHeuristic.html                | 10 +++-------
 doc/AStarVisitor.html                  | 10 +++-------
 doc/AdjacencyGraph.html                | 10 +++-------
 doc/AdjacencyMatrix.html               | 10 +++-------
 doc/BFSVisitor.html                    | 10 +++-------
 doc/BasicMatrix.html                   | 10 +++-------
 doc/BellmanFordVisitor.html            | 10 +++-------
 doc/BidirectionalGraph.html            | 10 +++-------
 doc/Buffer.html                        | 10 +++-------
 doc/ColorValue.html                    | 10 +++-------
 doc/DFSVisitor.html                    | 10 +++-------
 doc/DijkstraVisitor.html               | 10 +++-------
 doc/EdgeListGraph.html                 | 10 +++-------
 doc/EdgeMutableGraph.html              | 10 +++-------
 doc/EventVisitor.html                  | 10 +++-------
 doc/EventVisitorList.html              | 10 +++-------
 doc/Graph.html                         | 10 +++-------
 doc/IncidenceGraph.html                | 10 +++-------
 doc/IteratorConstructibleGraph.html    | 10 +++-------
 doc/Makefile                           |  6 ++++++
 doc/Monoid.html                        | 10 +++-------
 doc/MutableGraph.html                  | 10 +++-------
 doc/MutablePropertyGraph.html          | 10 +++-------
 doc/PropertyGraph.html                 | 10 +++-------
 doc/PropertyTag.html                   | 10 +++-------
 doc/VertexAndEdgeListGraph.html        | 10 +++-------
 doc/VertexListGraph.html               | 10 +++-------
 doc/VertexMutableGraph.html            | 10 +++-------
 doc/acknowledgements.html              | 10 +++-------
 doc/adjacency_iterator.html            |  7 +++++++
 doc/adjacency_list.html                | 10 +++-------
 doc/adjacency_list_traits.html         | 10 +++-------
 doc/adjacency_matrix.html              | 10 +++-------
 doc/astar_heuristic.html               | 10 +++-------
 doc/astar_search.html                  | 10 +++-------
 doc/astar_visitor.html                 | 10 +++-------
 doc/bandwidth.html                     | 10 +++-------
 doc/bc_clustering.html                 |  7 +++++++
 doc/bellman_ford_shortest.html         | 10 +++-------
 doc/bellman_visitor.html               | 10 +++-------
 doc/betweenness_centrality.html        |  7 +++++++
 doc/bfs_visitor.html                   | 10 +++-------
 doc/bgl_named_params.html              | 10 +++-------
 doc/bibliography.html                  | 10 +++-------
 doc/breadth_first_search.html          | 10 +++-------
 doc/breadth_first_visit.html           | 10 +++-------
 doc/challenge.html                     | 10 +++-------
 doc/circle_layout.html                 |  9 ++++++++-
 doc/compressed_sparse_row.html         |  7 +++++++
 doc/connected_components.html          | 10 +++-------
 doc/constructing_algorithms.html       | 10 +++-------
 doc/copy_graph.html                    | 10 +++-------
 doc/cuthill_mckee_ordering.html        | 10 +++-------
 doc/dag_shortest_paths.html            | 10 +++-------
 doc/default.css                        |  7 +++++++
 doc/depth_first_search.html            | 10 +++-------
 doc/depth_first_visit.html             | 10 +++-------
 doc/dfs_visitor.html                   | 10 +++-------
 doc/dijkstra_shortest_paths.html       | 10 +++-------
 doc/dijkstra_visitor.html              | 10 +++-------
 doc/distance_recorder.html             | 10 +++-------
 doc/edge_list.html                     | 10 +++-------
 doc/edmunds_karp_max_flow.html         | 10 +++-------
 doc/exception.html                     | 10 +++-------
 doc/faq.html                           | 10 +++-------
 doc/figs/Makefile                      |  5 +++++
 doc/file_dependency_example.html       | 10 +++-------
 doc/filtered_graph.html                | 10 +++-------
 doc/floyd_warshall_shortest.html       |  7 +++++++
 doc/fruchterman_reingold.html          |  8 ++++++++
 doc/graph_coloring.html                | 10 +++-------
 doc/graph_concepts.html                | 10 +++-------
 doc/graph_theory_review.html           | 10 +++-------
 doc/graph_traits.html                  | 10 +++-------
 doc/gursoy_atun_layout.html            |  7 +++++++
 doc/history.html                       | 10 +++-------
 doc/incident.html                      | 10 +++-------
 doc/incremental_components.html        | 10 +++-------
 doc/index.html                         | 10 +++-------
 doc/inv_adjacency_iterator.html        |  7 +++++++
 doc/isomorphism.html                   | 10 +++-------
 doc/johnson_all_pairs_shortest.html    | 10 +++-------
 doc/jwebfrob.pl                        |  5 +++++
 doc/kamada_kawai_spring_layout.html    |  7 +++++++
 doc/kevin_bacon.html                   | 10 +++-------
 doc/king_ordering.html                 | 10 +++-------
 doc/known_problems.html                | 10 +++-------
 doc/kruskal_min_spanning_tree.html     | 10 +++-------
 doc/layout_tolerance.html              |  9 ++++++++-
 doc/leda_conversion.html               | 10 +++-------
 doc/lengauer_tarjan_dominator_tree.htm | 10 +++-------
 doc/minimum_degree_ordering.html       | 10 +++-------
 doc/null_visitor.html                  | 10 +++-------
 doc/opposite.html                      | 10 +++-------
 doc/predecessor_recorder.html          | 10 +++-------
 doc/prim_minimum_spanning_tree.html    | 10 +++-------
 doc/profile.htm                        | 10 +++-------
 doc/property.html                      | 10 +++-------
 doc/property_map.html                  | 10 +++-------
 doc/property_writer.html               | 10 +++-------
 doc/publications.html                  | 10 +++-------
 doc/push_relabel_max_flow.html         | 10 +++-------
 doc/python.html                        |  7 +++++++
 doc/quick_tour.html                    | 10 +++-------
 doc/random.html                        |  7 +++++++
 doc/random_layout.html                 |  7 +++++++
 doc/read_graphviz.html                 |  7 +++++++
 doc/read_graphviz.rst                  |  4 ++++
 doc/reverse_graph.html                 | 10 +++++-----
 doc/sequential_vertex_coloring.html    |  7 +++++++
 doc/sloan_ordering.htm                 | 10 +++-------
 doc/sloan_start_end_vertices.htm       | 10 +++-------
 doc/sparse_matrix_ordering.html        | 10 +++-------
 doc/stanford_graph.html                | 11 +++--------
 doc/strong_components.html             | 10 +++-------
 doc/subgraph.html                      | 10 +++-------
 doc/table_of_contents.html             | 10 +++-------
 doc/time_stamper.html                  | 10 +++-------
 doc/topological_sort.html              | 10 +++-------
 doc/transitive_closure.html            | 10 +++-------
 doc/transpose_graph.html               | 10 +++-------
 doc/trouble_shooting.html              | 10 +++-------
 doc/undirected_dfs.html                | 10 +++-------
 doc/users.html                         |  7 +++++++
 doc/using_adjacency_list.html          | 10 +++-------
 doc/using_property_maps.html           | 10 +++-------
 doc/visitor_concepts.html              | 10 +++-------
 doc/wavefront.htm                      | 10 +++-------
 doc/write-graphviz.html                | 10 +++-------
 129 files changed, 472 insertions(+), 750 deletions(-)

diff --git a/doc/AStarHeuristic.html b/doc/AStarHeuristic.html
index 004bb64a..a123dc0b 100644
--- a/doc/AStarHeuristic.html
+++ b/doc/AStarHeuristic.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: AStarHeuristic
diff --git a/doc/AStarVisitor.html b/doc/AStarVisitor.html
index 60d3acab..fe4d3c5c 100644
--- a/doc/AStarVisitor.html
+++ b/doc/AStarVisitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: AStarVisitor
diff --git a/doc/AdjacencyGraph.html b/doc/AdjacencyGraph.html
index c902cd09..e644814b 100644
--- a/doc/AdjacencyGraph.html
+++ b/doc/AdjacencyGraph.html
@@ -2,13 +2,9 @@
 
 
 AdjacencyGraph
diff --git a/doc/AdjacencyMatrix.html b/doc/AdjacencyMatrix.html
index da02fdcf..22c4f17c 100644
--- a/doc/AdjacencyMatrix.html
+++ b/doc/AdjacencyMatrix.html
@@ -2,13 +2,9 @@
 
 
 AdjacencyMatrix
diff --git a/doc/BFSVisitor.html b/doc/BFSVisitor.html
index 8b17cc8f..7f8de201 100644
--- a/doc/BFSVisitor.html
+++ b/doc/BFSVisitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: BFSVisitor
diff --git a/doc/BasicMatrix.html b/doc/BasicMatrix.html
index 4941593d..56d24991 100644
--- a/doc/BasicMatrix.html
+++ b/doc/BasicMatrix.html
@@ -2,13 +2,9 @@
 
 
 BasicMatrix
diff --git a/doc/BellmanFordVisitor.html b/doc/BellmanFordVisitor.html
index 65ab652b..790624e0 100644
--- a/doc/BellmanFordVisitor.html
+++ b/doc/BellmanFordVisitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Bellman Ford Visitor
diff --git a/doc/BidirectionalGraph.html b/doc/BidirectionalGraph.html
index d3b5fde2..4aaf00b1 100644
--- a/doc/BidirectionalGraph.html
+++ b/doc/BidirectionalGraph.html
@@ -2,13 +2,9 @@
 
 
 Bidirectional
diff --git a/doc/Buffer.html b/doc/Buffer.html
index 8f568e95..2e3b0659 100644
--- a/doc/Buffer.html
+++ b/doc/Buffer.html
@@ -2,13 +2,9 @@
 
 
 Buffer
diff --git a/doc/ColorValue.html b/doc/ColorValue.html
index 9ec49d8f..28b15e48 100644
--- a/doc/ColorValue.html
+++ b/doc/ColorValue.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: ColorValue Concept
diff --git a/doc/DFSVisitor.html b/doc/DFSVisitor.html
index 4058a6ab..246303ac 100644
--- a/doc/DFSVisitor.html
+++ b/doc/DFSVisitor.html
@@ -2,13 +2,9 @@
 
 
 DFS Visitor
diff --git a/doc/DijkstraVisitor.html b/doc/DijkstraVisitor.html
index 5f5586cc..b8854c99 100644
--- a/doc/DijkstraVisitor.html
+++ b/doc/DijkstraVisitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Dijkstra Visitor
diff --git a/doc/EdgeListGraph.html b/doc/EdgeListGraph.html
index 68445af3..a4b7a2dd 100644
--- a/doc/EdgeListGraph.html
+++ b/doc/EdgeListGraph.html
@@ -2,13 +2,9 @@
 
 
 EdgeListGraph
diff --git a/doc/EdgeMutableGraph.html b/doc/EdgeMutableGraph.html
index 6d95116f..0301eb29 100644
--- a/doc/EdgeMutableGraph.html
+++ b/doc/EdgeMutableGraph.html
@@ -2,13 +2,9 @@
 
 
 Edge Mutable Graph
diff --git a/doc/EventVisitor.html b/doc/EventVisitor.html
index 4324e7b4..358fc0a7 100644
--- a/doc/EventVisitor.html
+++ b/doc/EventVisitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: EventVisitor
diff --git a/doc/EventVisitorList.html b/doc/EventVisitorList.html
index f86ae8d9..b83eae1d 100644
--- a/doc/EventVisitorList.html
+++ b/doc/EventVisitorList.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: EventVisitorList
diff --git a/doc/Graph.html b/doc/Graph.html
index a37b4d72..9a38fcd2 100644
--- a/doc/Graph.html
+++ b/doc/Graph.html
@@ -2,13 +2,9 @@
 
 
 Graph
diff --git a/doc/IncidenceGraph.html b/doc/IncidenceGraph.html
index 374207a4..efd49eab 100644
--- a/doc/IncidenceGraph.html
+++ b/doc/IncidenceGraph.html
@@ -2,13 +2,9 @@
 
 
 IncidenceGraph
diff --git a/doc/IteratorConstructibleGraph.html b/doc/IteratorConstructibleGraph.html
index 27ea47e4..1f71359e 100644
--- a/doc/IteratorConstructibleGraph.html
+++ b/doc/IteratorConstructibleGraph.html
@@ -2,13 +2,9 @@
 
 
 IteratorConstructibleGraph
diff --git a/doc/Makefile b/doc/Makefile
index b76546ec..2aa2fef8 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,3 +1,9 @@
+# Copyright (c) 2002 Trustees of Indiana University
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
 DVIPS		= dvips
 
 LATEX		= latex
diff --git a/doc/Monoid.html b/doc/Monoid.html
index 4a3e9453..37287c35 100644
--- a/doc/Monoid.html
+++ b/doc/Monoid.html
@@ -2,13 +2,9 @@
 
 
 Monoid
diff --git a/doc/MutableGraph.html b/doc/MutableGraph.html
index e1a95e3b..ae608838 100644
--- a/doc/MutableGraph.html
+++ b/doc/MutableGraph.html
@@ -2,13 +2,9 @@
 
 
 MutableGraph
diff --git a/doc/MutablePropertyGraph.html b/doc/MutablePropertyGraph.html
index 6c520c28..31f3dbcd 100644
--- a/doc/MutablePropertyGraph.html
+++ b/doc/MutablePropertyGraph.html
@@ -2,13 +2,9 @@
 
 
 MutablePropertyGraph
diff --git a/doc/PropertyGraph.html b/doc/PropertyGraph.html
index ec1d177d..f78ccade 100644
--- a/doc/PropertyGraph.html
+++ b/doc/PropertyGraph.html
@@ -2,13 +2,9 @@
 
 
 PropertyGraph
diff --git a/doc/PropertyTag.html b/doc/PropertyTag.html
index 54e51b13..8bc8a901 100644
--- a/doc/PropertyTag.html
+++ b/doc/PropertyTag.html
@@ -2,13 +2,9 @@
 
 
 Property
diff --git a/doc/VertexAndEdgeListGraph.html b/doc/VertexAndEdgeListGraph.html
index c7697558..785f78e0 100644
--- a/doc/VertexAndEdgeListGraph.html
+++ b/doc/VertexAndEdgeListGraph.html
@@ -2,13 +2,9 @@
 
 
 VertexAndEdgeListGraph
diff --git a/doc/VertexListGraph.html b/doc/VertexListGraph.html
index a2eca0b0..7de114b8 100644
--- a/doc/VertexListGraph.html
+++ b/doc/VertexListGraph.html
@@ -2,13 +2,9 @@
 
 
 VertexListGraph
diff --git a/doc/VertexMutableGraph.html b/doc/VertexMutableGraph.html
index 8f2ac694..b73306f4 100644
--- a/doc/VertexMutableGraph.html
+++ b/doc/VertexMutableGraph.html
@@ -2,13 +2,9 @@
 
 
 Vertex Mutable Graph
diff --git a/doc/acknowledgements.html b/doc/acknowledgements.html
index fe6a43b7..09c30cfb 100644
--- a/doc/acknowledgements.html
+++ b/doc/acknowledgements.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Acknowledgements
diff --git a/doc/adjacency_iterator.html b/doc/adjacency_iterator.html
index d1adc438..b995da3e 100644
--- a/doc/adjacency_iterator.html
+++ b/doc/adjacency_iterator.html
@@ -1,4 +1,11 @@
 
+
 
 
 
diff --git a/doc/adjacency_list.html b/doc/adjacency_list.html
index 3f44593e..48404d43 100644
--- a/doc/adjacency_list.html
+++ b/doc/adjacency_list.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Adjacency List
diff --git a/doc/adjacency_list_traits.html b/doc/adjacency_list_traits.html
index 3919d7ae..793bcbae 100644
--- a/doc/adjacency_list_traits.html
+++ b/doc/adjacency_list_traits.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Graph Traits
diff --git a/doc/adjacency_matrix.html b/doc/adjacency_matrix.html
index 8eac6722..4f8d5390 100644
--- a/doc/adjacency_matrix.html
+++ b/doc/adjacency_matrix.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Adjacency Matrix
diff --git a/doc/astar_heuristic.html b/doc/astar_heuristic.html
index 9cb0c5ff..163066bb 100644
--- a/doc/astar_heuristic.html
+++ b/doc/astar_heuristic.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: astar_heuristic
diff --git a/doc/astar_search.html b/doc/astar_search.html
index 2e3bf768..eec058c3 100644
--- a/doc/astar_search.html
+++ b/doc/astar_search.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: A* Heuristic Search
diff --git a/doc/astar_visitor.html b/doc/astar_visitor.html
index b8ace107..3df6a3ae 100644
--- a/doc/astar_visitor.html
+++ b/doc/astar_visitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: astar_visitor
diff --git a/doc/bandwidth.html b/doc/bandwidth.html
index f95fd530..a9424645 100644
--- a/doc/bandwidth.html
+++ b/doc/bandwidth.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Bandwidth
diff --git a/doc/bc_clustering.html b/doc/bc_clustering.html
index 71866190..d7be582f 100644
--- a/doc/bc_clustering.html
+++ b/doc/bc_clustering.html
@@ -1,4 +1,11 @@
 
+
 
 
 
 
 Bellman Ford Shortest Paths
diff --git a/doc/bellman_visitor.html b/doc/bellman_visitor.html
index 97d2cffa..0a5124f2 100644
--- a/doc/bellman_visitor.html
+++ b/doc/bellman_visitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: bellman_visitor
diff --git a/doc/betweenness_centrality.html b/doc/betweenness_centrality.html
index 76e519e1..e8eab286 100644
--- a/doc/betweenness_centrality.html
+++ b/doc/betweenness_centrality.html
@@ -1,5 +1,12 @@
 
 
+
   
     Boost Graph Library: Brandes' Betweenness Centrality
   
diff --git a/doc/bfs_visitor.html b/doc/bfs_visitor.html
index 3289fc0d..608669b3 100644
--- a/doc/bfs_visitor.html
+++ b/doc/bfs_visitor.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: bfs_visitor
diff --git a/doc/bgl_named_params.html b/doc/bgl_named_params.html
index e44c32b9..30eaebd0 100644
--- a/doc/bgl_named_params.html
+++ b/doc/bgl_named_params.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Named Parameters
diff --git a/doc/bibliography.html b/doc/bibliography.html
index 97f19fef..938ad768 100644
--- a/doc/bibliography.html
+++ b/doc/bibliography.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Bibliography
diff --git a/doc/breadth_first_search.html b/doc/breadth_first_search.html
index 82744934..a7c8edab 100644
--- a/doc/breadth_first_search.html
+++ b/doc/breadth_first_search.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Breadth-First Search
diff --git a/doc/breadth_first_visit.html b/doc/breadth_first_visit.html
index d7bda494..bd51793d 100644
--- a/doc/breadth_first_visit.html
+++ b/doc/breadth_first_visit.html
@@ -2,13 +2,9 @@
 
 
 Boost Graph Library: Breadth-First Visit
diff --git a/doc/challenge.html b/doc/challenge.html
index f21914e2..7a562285 100644
--- a/doc/challenge.html
+++ b/doc/challenge.html
@@ -2,13 +2,9 @@
 
 
 Challenge
diff --git a/doc/circle_layout.html b/doc/circle_layout.html
index 004b3c30..9e06dce1 100644
--- a/doc/circle_layout.html
+++ b/doc/circle_layout.html
@@ -1,4 +1,11 @@
-Function template circle_graph_layout
boost.png (6897 bytes)HomeLibrariesPeopleFAQMore

(Python)Function template circle_graph_layout

boost::circle_graph_layout — Layout the graph with the vertices at the points of a regular n-polygon.

Synopsis

+
+Function template circle_graph_layout
boost.png (6897 bytes)HomeLibrariesPeopleFAQMore

(Python)Function template circle_graph_layout

boost::circle_graph_layout — Layout the graph with the vertices at the points of a regular n-polygon.

Synopsis

 template<typename VertexListGraph, typename PositionMap, typename Radius> 
   void circle_graph_layout(const VertexListGraph & g, PositionMap position, 
                            Radius radius);

Where Defined

boost/graph/circle_layout.hpp

Description

The distance from the center of the polygon to each point is determined by the radius parameter. The position parameter must be an Lvalue Property Map whose value type is a class type containing x and y members that will be set to the x and y coordinates. diff --git a/doc/compressed_sparse_row.html b/doc/compressed_sparse_row.html index 056fcace..9323a4db 100644 --- a/doc/compressed_sparse_row.html +++ b/doc/compressed_sparse_row.html @@ -1,5 +1,12 @@ + Compressed Sparse Row Graph diff --git a/doc/connected_components.html b/doc/connected_components.html index acd27a71..c1811365 100644 --- a/doc/connected_components.html +++ b/doc/connected_components.html @@ -2,13 +2,9 @@ Boost Graph Library: Connected Components diff --git a/doc/constructing_algorithms.html b/doc/constructing_algorithms.html index a0e11156..c04c8bda 100644 --- a/doc/constructing_algorithms.html +++ b/doc/constructing_algorithms.html @@ -2,13 +2,9 @@ Boost Graph Library: Constructing Graph Algorithms diff --git a/doc/copy_graph.html b/doc/copy_graph.html index 5f3d03e2..368fc7e0 100644 --- a/doc/copy_graph.html +++ b/doc/copy_graph.html @@ -2,13 +2,9 @@ Boost Graph Library: Copy Graph diff --git a/doc/cuthill_mckee_ordering.html b/doc/cuthill_mckee_ordering.html index 9c63e62f..1af288db 100644 --- a/doc/cuthill_mckee_ordering.html +++ b/doc/cuthill_mckee_ordering.html @@ -2,13 +2,9 @@ - - - - - - - + -- Distributed under the Boost Software License, Version 1.0. + -- (See accompanying file LICENSE_1_0.txt or copy at + -- http://www.boost.org/LICENSE_1_0.txt) Boost Graph Library: Cuthill-Mckee Ordering diff --git a/doc/dag_shortest_paths.html b/doc/dag_shortest_paths.html index 9c196963..ad6c675e 100644 --- a/doc/dag_shortest_paths.html +++ b/doc/dag_shortest_paths.html @@ -2,13 +2,9 @@ Boost Graph Library: Directed Acyclic Graph Shortest Paths diff --git a/doc/default.css b/doc/default.css index 0e4226a0..2dcd838f 100644 --- a/doc/default.css +++ b/doc/default.css @@ -6,6 +6,13 @@ :copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. + +-- Copyright (c) 2005 Trustees of Indiana University + +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + */ .first { diff --git a/doc/depth_first_search.html b/doc/depth_first_search.html index 8f2fc21a..6bc6f110 100644 --- a/doc/depth_first_search.html +++ b/doc/depth_first_search.html @@ -2,13 +2,9 @@ Boost Graph Library: Depth-First Search diff --git a/doc/depth_first_visit.html b/doc/depth_first_visit.html index c14fba42..329d2cf2 100644 --- a/doc/depth_first_visit.html +++ b/doc/depth_first_visit.html @@ -2,13 +2,9 @@ Boost Graph Library: Depth-First Visit diff --git a/doc/dfs_visitor.html b/doc/dfs_visitor.html index 40c94200..6b79d823 100644 --- a/doc/dfs_visitor.html +++ b/doc/dfs_visitor.html @@ -2,13 +2,9 @@ Boost Graph Library: dfs_visitor diff --git a/doc/dijkstra_shortest_paths.html b/doc/dijkstra_shortest_paths.html index 90c28924..a7bdd166 100644 --- a/doc/dijkstra_shortest_paths.html +++ b/doc/dijkstra_shortest_paths.html @@ -2,13 +2,9 @@ Boost Graph Library: Dijkstra's Shortest Paths diff --git a/doc/dijkstra_visitor.html b/doc/dijkstra_visitor.html index 9e0c6b5e..995030f8 100644 --- a/doc/dijkstra_visitor.html +++ b/doc/dijkstra_visitor.html @@ -2,13 +2,9 @@ Boost Graph Library: dijkstra_visitor diff --git a/doc/distance_recorder.html b/doc/distance_recorder.html index 67e4196d..eb1d137a 100644 --- a/doc/distance_recorder.html +++ b/doc/distance_recorder.html @@ -2,13 +2,9 @@ Boost Graph Library: distance_recorder diff --git a/doc/edge_list.html b/doc/edge_list.html index 0d2384a3..4a556cef 100644 --- a/doc/edge_list.html +++ b/doc/edge_list.html @@ -2,13 +2,9 @@ Boost Graph Library: Edge List Class diff --git a/doc/edmunds_karp_max_flow.html b/doc/edmunds_karp_max_flow.html index 6546b2d0..4478c4e4 100644 --- a/doc/edmunds_karp_max_flow.html +++ b/doc/edmunds_karp_max_flow.html @@ -2,13 +2,9 @@ Boost Graph Library: Edmunds-Karp Maximum Flow diff --git a/doc/exception.html b/doc/exception.html index de010fe0..f5cbdf28 100644 --- a/doc/exception.html +++ b/doc/exception.html @@ -2,13 +2,9 @@ Boost Graph Library: Exceptions diff --git a/doc/faq.html b/doc/faq.html index 6f9b7652..eeef22e4 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -2,13 +2,9 @@ Boost Graph Library: FAQ diff --git a/doc/figs/Makefile b/doc/figs/Makefile index 444eb094..7c63524e 100644 --- a/doc/figs/Makefile +++ b/doc/figs/Makefile @@ -1,4 +1,9 @@ # -*- makefile -*- +# Copyright (c) 2002 Trustees of Indiana University +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) .SUFFIXES: .fig .gif .tif .jpeg diff --git a/doc/file_dependency_example.html b/doc/file_dependency_example.html index 995385db..3623777b 100644 --- a/doc/file_dependency_example.html +++ b/doc/file_dependency_example.html @@ -2,13 +2,9 @@ File Dependency Example diff --git a/doc/filtered_graph.html b/doc/filtered_graph.html index b1d1a1be..b8bcd2d4 100644 --- a/doc/filtered_graph.html +++ b/doc/filtered_graph.html @@ -2,13 +2,9 @@ Boost Graph Library: Filtered Graph diff --git a/doc/floyd_warshall_shortest.html b/doc/floyd_warshall_shortest.html index 1e96d505..8952cf26 100644 --- a/doc/floyd_warshall_shortest.html +++ b/doc/floyd_warshall_shortest.html @@ -1,4 +1,11 @@ + Floyd-Warshall All Pairs Shortest Paths + + Boost Graph Library: Fruchterman-Reingold Force-Directed Layout Graph Coloring Example diff --git a/doc/graph_concepts.html b/doc/graph_concepts.html index ff33cef2..cb82769b 100644 --- a/doc/graph_concepts.html +++ b/doc/graph_concepts.html @@ -2,13 +2,9 @@ Boost Graph Concepts diff --git a/doc/graph_theory_review.html b/doc/graph_theory_review.html index 65823bbb..a541936d 100644 --- a/doc/graph_theory_review.html +++ b/doc/graph_theory_review.html @@ -2,13 +2,9 @@ Boost Graph Library: Graph Theory Review diff --git a/doc/graph_traits.html b/doc/graph_traits.html index 413ccd15..8831c34b 100644 --- a/doc/graph_traits.html +++ b/doc/graph_traits.html @@ -2,13 +2,9 @@ Boost Graph Library: Graph Traits diff --git a/doc/gursoy_atun_layout.html b/doc/gursoy_atun_layout.html index d0812e78..16bf2be8 100644 --- a/doc/gursoy_atun_layout.html +++ b/doc/gursoy_atun_layout.html @@ -1,4 +1,11 @@ + Boost Graph Library: Gürsoy-Atun Layout + + + +C++ Boost + +sorted_erdos_renyi_iterator + +
+ +

+template<typename RandomGenerator, typename Graph>
+class sorted_erdos_renyi_iterator
+{
+public:
+  typedef std::input_iterator_tag iterator_category;
+  typedef std::pair<vertices_size_type, vertices_size_type> value_type;
+  typedef const value_type& reference;
+  typedef const value_type* pointer;
+  typedef void difference_type;
+
+  sorted_erdos_renyi_iterator();
+  sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n,
+                              double probability = 0.0, bool allow_self_loops = false);
+
+  // Iterator operations
+  reference operator*() const;
+  pointer operator->() const;
+  sorted_erdos_renyi_iterator& operator++();
+  sorted_erdos_renyi_iterator operator++(int);
+  bool operator==(const sorted_erdos_renyi_iterator& other) const;
+  bool operator!=(const sorted_erdos_renyi_iterator& other) const;
+}; 
+
+ +

This class template implements a generator for Erdös-Renyi +graphs, suitable for initializing an adjacency_list or other graph +structure with iterator-based initialization. An Erdös-Renyi +graph G = (n, p) is a graph with n vertices +that. The probability of having an edge (u, v) in G +is p for any vertices u and v. Typically, +there are no self-loops, but the generator can optionally introduce +self-loops with probability p.

+ +

Erdös-Renyi graphs typically exhibit very little +structure. For this reason, they are rarely useful in modeling +real-world problems. However, they are often used when determining +the theoretical complexity of complex graph algorithms.

+ +

Where Defined

+ +boost/graph/erdos_renyi_generator.hpp + +

Constructors

+ + +
sorted_erdos_renyi_iterator();
+
+Constructs a past-the-end iterator. +
+ +
+sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n,
+                            double probability = 0.0, bool allow_self_loops = false);
+
+
+Constructs an Erdös-Renyi generator iterator that creates a +graph with n vertices and a given probability of the +total number of edges that a simple graph may have. +probability. Random vertices and edges are selected using the +random number generator gen. Self-loops are permitted only when +allow_self_loops is true. +
+ +

Example

+ +
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/erdos_renyi_generator.hpp>
+#include <boost/random/linear_congruential.hpp>
+
+typedef boost::adjacency_list<> Graph;
+typedef boost::sorted_erdos_renyi_iterator<boost::minstd_rand, Graph> ERGen;
+
+int main()
+{
+  boost::minstd_rand gen;
+  // Create graph with 100 nodes and edges with probability 0.05
+  Graph g(ERGen(gen, 100, 0.05), ERGen(), 100);
+  return 0;
+}
+
+ +
+
+ + +
Copyright © 2005 +Jeremiah Willcock, Indiana University ()
+ +Doug Gregor, Indiana University ()
+ Andrew Lumsdaine, +Indiana University () +
+ + + From fbd5c5120fbeebe709af9291547ddd5758d0e54a Mon Sep 17 00:00:00 2001 From: Aaron Windsor Date: Thu, 14 Dec 2006 02:12:42 +0000 Subject: [PATCH 042/279] merged file name changes from HEAD to RC_1_34_0 [SVN r36373] --- doc/lengauer_tarjan_dominator_tree.htm | 183 ------------------------- doc/sorted_erdos_renyi_generator.html | 133 ------------------ 2 files changed, 316 deletions(-) delete mode 100755 doc/lengauer_tarjan_dominator_tree.htm delete mode 100644 doc/sorted_erdos_renyi_generator.html diff --git a/doc/lengauer_tarjan_dominator_tree.htm b/doc/lengauer_tarjan_dominator_tree.htm deleted file mode 100755 index 9667b7a9..00000000 --- a/doc/lengauer_tarjan_dominator_tree.htm +++ /dev/null @@ -1,183 +0,0 @@ - - - -Boost Graph Library: Lengauer-Tarjan Dominator Tree Algorithm - -C++ Boost - -
- -

-lengauer_tarjan_dominator_tree -

- - -

-

-// The simplest version:
-// Data structures for depth first search is created internally,
-// and depth first search runs internally.
-template <class Graph, class DomTreePredMap>
-void
-lengauer_tarjan_dominator_tree
-  (const Graph& g,
-   const typename graph_traits<Graph>::vertex_descriptor& entry,
-   DomTreePredMap domTreePredMap)
-
-// The version providing data structures for depth first search:
-// After calling this function,
-// user can reuse the depth first search related information
-// filled in property maps.
-template <class Graph, class IndexMap, class TimeMap, class PredMap,
-             class VertexVector, class DomTreePredMap>
-void
-lengauer_tarjan_dominator_tree
-  (const Graph& g,
-   const typename graph_traits<Graph>::vertex_descriptor& entry,
-   const IndexMap& indexMap,
-   TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum,
-   DomTreePredMap domTreePredMap)
-
-// The version without depth first search:
-// The caller should provide depth first search related information
-// evaluated before.
-template <class Graph, class IndexMap, class TimeMap, class PredMap,
-             class VertexVector, class DomTreePredMap>
-void
-lengauer_tarjan_dominator_tree_without_dfs(
-  (const Graph& g,
-   const typename graph_traits<Graph>::vertex_descriptor& entry,
-   const IndexMap& indexMap,
-   TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum,
-   DomTreePredMap domTreePredMap)
-
- -

This algorithm [65,66,67] builds the dominator tree for -directed graph. There are three options for dealing the depth first -search related values. The simplest version creates data structures -and run depth first search internally. However, chances are that a -user wants to reuse the depth first search data, so we have two -versions.

- -

A vertex u dominates a vertex v, if every path of -directed graph from the entry to v must go through u. In -the left graph of Figure 1, -vertex 1 dominates vertex 2, 3, 4, 5, 6 and 7, because we have to pass -vertex 1 to reach those vertex. Note that vertex 4 dominates vertex 6, -even though vertex 4 is a successor of vertex 6. Dominator -relationship is useful in many applications especially for compiler -optimization. We can define the immediate dominator for each vertex -such that idom(n) dominates n but does not dominate any other -dominator of n. For example, vertex 1, 3 and 4 are dominators -of vertex 6, but vertex 4 is the immediate dominator, because vertex 1 -and 3 dominates vertex 4. If we make every idom of each vertex as its -parent, we can build the dominator tree like the right part of Figure 1

- -

-

- -

An easy way to build dominator tree is to use iterative bit vector -algorithm, but it may be slow in the worst case. We implemented -Lengauer-Tarjan algorithm whose time complexity is -O((V+E)log(V+E)).

- -

Lengauer-Tarjan algorithm utilizes two techniques. The first one -is, as an intermediate step, finding semidominator which is relatively -easier to evaluate than immediate dominator, and the second one is the -path compression. For the detail of the algorithm, see [65].

- -

Where Defined

- -boost/graph/dominator_tree.hpp - -

Parameters

- -IN: const Graph& g -
- The graph object on which the algorithm will be applied. - The type Graph must be a model of - Vertex List Graph - and Bidirectional Graph.
-
- -IN: vertex_descriptor entry -
- The entry vertex. The dominator tree will be rooted at this vertex. -
- -IN: IndexMap indexMap -
- This maps each vertex to an integer in the range [0, num_vertices(g)). - The type - VertexIndexMap must be a model of - Readable Property Map. The value type of the map must be an - integer type. The vertex descriptor type of the graph needs to be - usable as the key type of the map. -
- -IN/OUT: TimeMap dfnumMap -
- The sequence number of depth first search. The type TimeMap must be a model of Read/Write Property Map. The vertex descriptor type of the graph needs to be usable as the key type of the TimeMap. -
- -IN/OUT: PredMap parentMap -
- The predecessor map records the parent of the depth first search tree. The PredMap type must be a Read/Write Property Map whose key and value types are the same as the vertex descriptor type of the graph. -
- -IN/OUT: VertexVector verticesByDFNum -
- The vector containing vertices in depth first search order. If we access this vector sequentially, it's equivalent to access vertices by depth first search order. -
- -OUT: DomTreePredMap domTreePredMap -
- The dominator tree where parents are each children's immediate dominator. -
- -

Complexity

- -

-The time complexity is O((V+E)log(V+E)). - -

Example

- -

-See -test/dominator_tree_test.cpp for an example of using Dijkstra's -algorithm. - -
-


- - -
Copyright © 2005 -JongSoo Park, Stanford University -
- - - - diff --git a/doc/sorted_erdos_renyi_generator.html b/doc/sorted_erdos_renyi_generator.html deleted file mode 100644 index 54e13a72..00000000 --- a/doc/sorted_erdos_renyi_generator.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - Boost Graph Library: Erdös-Renyi Generator - - - - -C++ Boost - -sorted_erdos_renyi_iterator - -
- -
-template<typename RandomGenerator, typename Graph>
-class sorted_erdos_renyi_iterator
-{
-public:
-  typedef std::input_iterator_tag iterator_category;
-  typedef std::pair<vertices_size_type, vertices_size_type> value_type;
-  typedef const value_type& reference;
-  typedef const value_type* pointer;
-  typedef void difference_type;
-
-  sorted_erdos_renyi_iterator();
-  sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n,
-                              double probability = 0.0, bool allow_self_loops = false);
-
-  // Iterator operations
-  reference operator*() const;
-  pointer operator->() const;
-  sorted_erdos_renyi_iterator& operator++();
-  sorted_erdos_renyi_iterator operator++(int);
-  bool operator==(const sorted_erdos_renyi_iterator& other) const;
-  bool operator!=(const sorted_erdos_renyi_iterator& other) const;
-}; 
-
- -

This class template implements a generator for Erdös-Renyi -graphs, suitable for initializing an adjacency_list or other graph -structure with iterator-based initialization. An Erdös-Renyi -graph G = (n, p) is a graph with n vertices -that. The probability of having an edge (u, v) in G -is p for any vertices u and v. Typically, -there are no self-loops, but the generator can optionally introduce -self-loops with probability p.

- -

Erdös-Renyi graphs typically exhibit very little -structure. For this reason, they are rarely useful in modeling -real-world problems. However, they are often used when determining -the theoretical complexity of complex graph algorithms.

- -

Where Defined

- -boost/graph/erdos_renyi_generator.hpp - -

Constructors

- - -
sorted_erdos_renyi_iterator();
-
-Constructs a past-the-end iterator. -
- -
-sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n,
-                            double probability = 0.0, bool allow_self_loops = false);
-
-
-Constructs an Erdös-Renyi generator iterator that creates a -graph with n vertices and a given probability of the -total number of edges that a simple graph may have. -probability. Random vertices and edges are selected using the -random number generator gen. Self-loops are permitted only when -allow_self_loops is true. -
- -

Example

- -
-#include <boost/graph/adjacency_list.hpp>
-#include <boost/graph/erdos_renyi_generator.hpp>
-#include <boost/random/linear_congruential.hpp>
-
-typedef boost::adjacency_list<> Graph;
-typedef boost::sorted_erdos_renyi_iterator<boost::minstd_rand, Graph> ERGen;
-
-int main()
-{
-  boost::minstd_rand gen;
-  // Create graph with 100 nodes and edges with probability 0.05
-  Graph g(ERGen(gen, 100, 0.05), ERGen(), 100);
-  return 0;
-}
-
- -
-
- - -
Copyright © 2005 -Jeremiah Willcock, Indiana University ()
- -Doug Gregor, Indiana University ()
- Andrew Lumsdaine, -Indiana University () -
- - - From 64b6038f92f59cf8822e122096f64df4b849442d Mon Sep 17 00:00:00 2001 From: Aaron Windsor Date: Thu, 14 Dec 2006 02:20:34 +0000 Subject: [PATCH 043/279] renaming sorted_erdos_renyi_generator.html and lengauer_tarjan_dominator_tree.htm so inspection reports won't complain [SVN r36374] --- doc/history.html | 7 +++++-- doc/table_of_contents.html | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/history.html b/doc/history.html index 8ff669c6..8043746a 100644 --- a/doc/history.html +++ b/doc/history.html @@ -79,14 +79,17 @@ September 27, 2000.
  • Version 1.34.0
    New algorithms and components
    Enhancements
    • biconnected_components now has a visitor parameter and supports named parameters, from Janusz Piwowarski.
    • adjacency_matrix now models the Bidirectional Graph concept.
    • adjacency_list is now Serializable, from Jeremy Siek of Rice University.
    • +
    • Added edges_size_type and vertices_size_type to adjacency_list_traits, from Jeremy Siek of Rice University.
    • +
    • Added operator< , etc. to the edge descriptor of adjacency_list, + from Jeremy Siek of Rice University.

    Bug Fixes