From 801a11bf4a30ea331ba93561e6478b2ec3b8bb2c Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Thu, 15 Oct 2009 20:40:46 +0000 Subject: [PATCH] Merged in changes from trunk for Boost.Graph and Boost.PropertyMap. Includes r56013, r56014, r56015, r56016, r56017, r56089, r56097, r56116, r56117, r56126, r56127, r56128, r56140, r56147, r56300, r56301, r56339, r56360, r56454, r56473, r56563, r56651, r56654, r56658, r56682, r56732, r56796, r56855, r56856, r56868, r55667, r56860, r55473, r55507, r55528, r55749, r56147, r55723, r56109, r56859, and r55780. [SVN r56881] --- doc/BUILD_DOCS.sh | 1 + doc/Graph.html | 5 +- doc/IncidenceGraph.html | 4 +- doc/compressed_sparse_row.html | 49 +- doc/figs/grid_graph_indexed.png | Bin 0 -> 57724 bytes doc/figs/grid_graph_indexed.svg | 1128 +++++++++++++ doc/figs/grid_graph_unindexed.svg | 412 +++++ doc/figs/grid_graph_unwrapped.png | Bin 0 -> 17441 bytes doc/figs/grid_graph_wrapped.png | Bin 0 -> 25404 bytes doc/grid_graph.html | 304 ++++ doc/grid_graph_export_svg.sh | 19 + doc/incremental_components.html | 226 ++- doc/quick_tour.html | 7 +- doc/table_of_contents.html | 3 + example/Jamfile.v2 | 1 + example/grid_graph_example.cpp | 86 + example/incremental-components-eg.cpp | 94 +- example/incremental_components.cpp | 99 +- example/incremental_components.expected | 2 +- example/quick_tour.cpp | 19 +- .../graph/compressed_sparse_row_graph.hpp | 1446 ++++++++--------- .../boost/graph/cuthill_mckee_ordering.hpp | 4 +- include/boost/graph/depth_first_search.hpp | 1 - .../detail/compressed_sparse_row_struct.hpp | 649 ++++++++ include/boost/graph/detail/histogram_sort.hpp | 286 ++++ .../graph/detail/incremental_components.hpp | 162 +- .../boost/graph/detail/indexed_properties.hpp | 19 + include/boost/graph/erdos_renyi_generator.hpp | 4 +- include/boost/graph/fruchterman_reingold.hpp | 68 +- include/boost/graph/grid_graph.hpp | 991 +++++++++++ .../boost/graph/incremental_components.hpp | 192 ++- include/boost/graph/properties.hpp | 2 +- test/Jamfile.v2 | 3 + test/csr_graph_test.cpp | 121 +- test/grid_graph_cc.cpp | 33 + test/grid_graph_test.cpp | 211 +++ test/incremental_components_test.cpp | 162 ++ test/layout_test.cpp | 14 - 38 files changed, 5515 insertions(+), 1312 deletions(-) create mode 100644 doc/figs/grid_graph_indexed.png create mode 100644 doc/figs/grid_graph_indexed.svg create mode 100644 doc/figs/grid_graph_unindexed.svg create mode 100644 doc/figs/grid_graph_unwrapped.png create mode 100644 doc/figs/grid_graph_wrapped.png create mode 100644 doc/grid_graph.html create mode 100755 doc/grid_graph_export_svg.sh create mode 100644 example/grid_graph_example.cpp create mode 100644 include/boost/graph/detail/compressed_sparse_row_struct.hpp create mode 100644 include/boost/graph/detail/histogram_sort.hpp create mode 100644 include/boost/graph/grid_graph.hpp create mode 100644 test/grid_graph_cc.cpp create mode 100644 test/grid_graph_test.cpp create mode 100644 test/incremental_components_test.cpp diff --git a/doc/BUILD_DOCS.sh b/doc/BUILD_DOCS.sh index ac11f274..e18de3b3 100755 --- a/doc/BUILD_DOCS.sh +++ b/doc/BUILD_DOCS.sh @@ -10,3 +10,4 @@ for i in read_graphml read_graphviz write_graphml; do rst2html.py -gdt --link-stylesheet --traceback --trim-footnote-reference-space --footnote-references=superscript --stylesheet=../../../rst.css $i.rst > $i.html done +# Also see grid_graph_export_png.sh for figure conversions diff --git a/doc/Graph.html b/doc/Graph.html index 2c74f367..08423b10 100644 --- a/doc/Graph.html +++ b/doc/Graph.html @@ -62,9 +62,8 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructib An edge descriptor corresponds to a unique edge (u,v) in a graph. An edge descriptor must be Default Constructible, -Assignable, -and Equality Comparable. +Assignable, and +Equality Comparable. diff --git a/doc/IncidenceGraph.html b/doc/IncidenceGraph.html index cbdc60b1..29db1946 100644 --- a/doc/IncidenceGraph.html +++ b/doc/IncidenceGraph.html @@ -76,7 +76,7 @@ href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator.
boost::graph_traits<G>::degree_size_type
-The unsigned intergral type used for representing the number +The unsigned integral type used for representing the number out-edges or incident edges of a vertex. @@ -108,7 +108,7 @@ directed graphs) or incident edges (for undirected graphs) of vertex u in graph g. The source vertex of an edge obtained via an out edge iterator is guaranteed (for both directed and undirected graphs) to be the vertex u used in the call to -out_edges(u, g) and the target vertex must the a vertex +out_edges(u, g) and the target vertex must be a vertex adjacent to u.[1]
Return type: std::pair<out_edge_iterator, out_edge_iterator> diff --git a/doc/compressed_sparse_row.html b/doc/compressed_sparse_row.html index d7cefa17..5086ac68 100644 --- a/doc/compressed_sparse_row.html +++ b/doc/compressed_sparse_row.html @@ -40,7 +40,8 @@ function address(host, user) {

The class template compressed_sparse_row_graph is a graph class that uses the compact Compressed Sparse Row (CSR) - format to store directed graphs. While CSR graphs have much less + format to store directed (and bidirectional) graphs. While CSR graphs have + much less overhead than many other graph formats (e.g., adjacency_list), they do not provide any mutability: one cannot add or remove vertices @@ -67,14 +68,20 @@ function address(host, user) { providing the offset of the first edge outgoing from each vertex. Iteration over the out-edges for the ith vertex in the graph is achieved by - visiting edge_array[vertex_array[i]], edge_array[vertex_array[i]+1], + visiting edge_array[vertex_array[i]], + edge_array[vertex_array[i]+1], ..., edge_array[vertex_array[i+1]]. This format minimizes memory use to O(n + m), where n and m are the number of vertices and edges, respectively. The constants multiplied by n and m are based on the size of the integers needed to represent indices into the edge and vertex arrays, respectively, which can be controlled using - the template parameters.

+ the template parameters. The + Directed template parameter controls whether one edge direction + (the default) or both directions are stored. A directed CSR graph has + Directed = directedS and a bidirectional CSR graph (only + supported with the new interface and with a limited set of constructors) + has Directed = bidirectionalS.