From 9d0640b6143a4cb441b38ff9356e088cd1043b2e Mon Sep 17 00:00:00 2001
From: Jeremiah Willcock
Date: Tue, 29 Dec 2009 03:50:53 +0000
Subject: [PATCH] Merged changes from trunk that are going into 1.42.0
[SVN r58554]
---
build/Jamfile.v2 | 44 +--
doc/astar_search.html | 3 +
doc/compressed_sparse_row.html | 163 ++------
doc/index.html | 39 +-
doc/known_problems.html | 8 -
doc/kolmogorov_max_flow.html | 4 +-
doc/prim_minimum_spanning_tree.html | 5 +-
doc/table_of_contents.html | 290 +++++++-------
doc/transitive_closure.html | 5 +-
example/labeled_graph.cpp | 2 -
include/boost/graph/adjacency_list.hpp | 39 +-
include/boost/graph/adjacency_list_io.hpp | 2 +-
include/boost/graph/adjacency_matrix.hpp | 18 +-
include/boost/graph/astar_search.hpp | 4 +-
.../boost/graph/biconnected_components.hpp | 2 +-
.../boost/graph/bron_kerbosch_all_cliques.hpp | 10 +-
.../boost/graph/clustering_coefficient.hpp | 7 +-
.../graph/compressed_sparse_row_graph.hpp | 170 +--------
include/boost/graph/core_numbers.hpp | 2 +-
include/boost/graph/dag_shortest_paths.hpp | 2 +-
include/boost/graph/depth_first_search.hpp | 10 +-
include/boost/graph/detail/adjacency_list.hpp | 8 +-
.../detail/compressed_sparse_row_struct.hpp | 24 +-
include/boost/graph/detail/histogram_sort.hpp | 4 +-
include/boost/graph/dll_import_export.hpp | 30 ++
include/boost/graph/dominator_tree.hpp | 2 +-
include/boost/graph/filtered_graph.hpp | 18 +-
.../boost/graph/floyd_warshall_shortest.hpp | 2 +-
include/boost/graph/geodesic_distance.hpp | 2 +-
include/boost/graph/graph_traits.hpp | 10 +
include/boost/graph/graphml.hpp | 55 +--
include/boost/graph/graphviz.hpp | 15 +-
include/boost/graph/grid_graph.hpp | 2 +-
include/boost/graph/howard_cycle_ratio.hpp | 20 +-
.../boost/graph/is_straight_line_drawing.hpp | 2 +-
include/boost/graph/isomorphism.hpp | 2 +-
include/boost/graph/kolmogorov_max_flow.hpp | 3 +-
include/boost/graph/labeled_graph.hpp | 5 +-
include/boost/graph/lookup_edge.hpp | 50 +++
.../boost/graph/max_cardinality_matching.hpp | 12 +-
.../boost/graph/mcgregor_common_subgraphs.hpp | 4 +-
include/boost/graph/metric_tsp_approx.hpp | 11 +-
include/boost/graph/named_function_params.hpp | 6 +-
.../planar_detail/boyer_myrvold_impl.hpp | 6 +-
include/boost/graph/planar_face_traversal.hpp | 4 +-
include/boost/graph/properties.hpp | 20 +-
.../property_maps/constant_property_map.hpp | 2 +-
include/boost/graph/r_c_shortest_paths.hpp | 14 +-
include/boost/graph/reverse_graph.hpp | 36 +-
include/boost/graph/subgraph.hpp | 8 +-
include/boost/graph/two_bit_color_map.hpp | 7 +-
include/boost/pending/property.hpp | 12 +-
src/graphml.cpp | 361 +++++-------------
src/read_graphviz_new.cpp | 11 +-
test/Jamfile.v2 | 10 +-
test/adj_list_loops.cpp | 4 -
test/astar_search_test.cpp | 4 +-
test/basic_planarity_test.cpp | 2 +-
test/bron_kerbosch_all_cliques.cpp | 2 +-
test/closeness_centrality.cpp | 4 +-
test/clustering_coefficient.cpp | 4 +-
test/core_numbers_test.cpp | 8 +-
test/csr_graph_test.cpp | 63 +--
test/degree_centrality.cpp | 4 +-
test/dfs.cpp | 8 +-
test/dominator_tree_test.cpp | 2 +-
test/eccentricity.cpp | 4 +-
test/grid_graph_cc.cpp | 4 +-
test/grid_graph_test.cpp | 6 +-
test/is_straight_line_draw_test.cpp | 2 +-
test/labeled_graph.cpp | 2 -
test/layout_test.cpp | 4 +-
test/make_bicon_planar_test.cpp | 2 +-
test/make_maximal_planar_test.cpp | 2 +-
test/matching_test.cpp | 4 +-
test/mcgregor_subgraphs_test.cpp | 4 +-
test/mean_geodesic.cpp | 4 +-
test/metric_tsp_approx.cpp | 2 +-
test/named_vertices_test.cpp | 2 +-
test/r_c_shortest_paths_test.cpp | 2 +-
test/serialize.cpp | 4 +-
test/subgraph.cpp | 2 +-
test/subgraph_bundled.cpp | 6 +-
test/subgraph_props.cpp | 4 -
test/test_construction.hpp | 2 +-
test/test_destruction.hpp | 6 +-
test/test_direction.hpp | 6 +-
test/test_graphs.cpp | 2 -
test/tiernan_all_cycles.cpp | 2 +-
89 files changed, 643 insertions(+), 1147 deletions(-)
create mode 100644 include/boost/graph/dll_import_export.hpp
create mode 100644 include/boost/graph/lookup_edge.hpp
mode change 100755 => 100644 test/dominator_tree_test.cpp
diff --git a/build/Jamfile.v2 b/build/Jamfile.v2
index eb4c4787..c05fdb31 100644
--- a/build/Jamfile.v2
+++ b/build/Jamfile.v2
@@ -11,53 +11,19 @@ project boost/graph
: source-location ../src
;
-local optional_sources ;
-local optional_reqs ;
-
-if [ modules.peek : EXPAT_INCLUDE ] && [ modules.peek : EXPAT_LIBPATH ]
-{
- local EXPAT_INCLUDE = [ modules.peek : EXPAT_INCLUDE ] ;
- local EXPAT_LIBPATH = [ modules.peek : EXPAT_LIBPATH ] ;
-
- if --debug-configuration in [ modules.peek : ARGV ]
- {
- ECHO "Expat include directory: $(EXPAT_INCLUDE)" ;
- ECHO "Expat library directory: $(EXPAT_LIBPATH)" ;
- }
-
- alias graphml
- : graphml.cpp
- : # requirements
- : # default built
- : # usage requirements
- $(EXPAT_INCLUDE)
- $(EXPAT_LIBPATH)
- expat
- ;
-}
-else
-{
- message graphml
- : "warning: Graph library does not contain optional GraphML reader."
- : "note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the"
- : "note: directories containing the Expat headers and libraries, respectively."
- ;
-}
-explicit graphml ;
-
lib boost_graph
:
read_graphviz_new.cpp
- graphml
+ graphml.cpp
:
../../regex/build//boost_regex
- 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
+ # User reports that VC++ 8.0 does not fail anymore, so that is removed
msvc-7.1:-GR-
- msvc-8.0:-GR-
+ :
+ :
+ ../../regex/build//boost_regex
;
boost-install boost_graph ;
diff --git a/doc/astar_search.html b/doc/astar_search.html
index d81680da..dbde1080 100644
--- a/doc/astar_search.html
+++ b/doc/astar_search.html
@@ -69,6 +69,9 @@ astar_search_no_init
ColorMap color, VertexIndexMap index_map,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
+
+Note that the index_map and color parameters are swapped in
+astar_search_no_init relative to astar_search.
diff --git a/doc/compressed_sparse_row.html b/doc/compressed_sparse_row.html
index 5086ac68..68a0ed9b 100644
--- a/doc/compressed_sparse_row.html
+++ b/doc/compressed_sparse_row.html
@@ -49,17 +49,6 @@ function address(host, user) {
applications or for very large graphs that you do not need to
change.
- There are two interfaces to the compressed sparse row graph. The
- old interface requires that all out edges from a single vertex are
- sorted by target, and does not support construction of the graph from
- unsorted arrays of sources and targets. The new interface has these
- new constructors, but does not support incremental construction of the
- graph or the edge_range() and edge() functions. The
- old interface is the default, but will be removed in a later version of
- Boost. To select the new interface, add #define
- BOOST_GRAPH_USE_NEW_CSR_INTERFACE before including
- <boost/graph/compressed_sparse_row_graph.hpp> .
-
The CSR format stores vertices and edges in separate arrays,
with the indices into these arrays corresponding to the identifier
for the vertex or edge, respectively. The edge array is sorted by
@@ -79,8 +68,8 @@ function address(host, user) {
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)
+ Directed = directedS and a bidirectional CSR graph (with
+ a limited set of constructors)
has Directed = bidirectionalS .
@@ -121,7 +110,7 @@ public:
// Graph constructors
compressed_sparse_row_graph ();
- // Unsorted edge list constructors (new interface only)
+ // Unsorted edge list constructors
template<typename InputIterator>
compressed_sparse_row_graph (edges_are_unsorted_t,
InputIterator edge_begin, InputIterator edge_end,
@@ -148,21 +137,7 @@ public:
vertices_size_type numverts,
const GraphProperty& prop = GraphProperty());
- // Old sorted edge list constructors (old interface only)
- template<typename InputIterator>
- compressed_sparse_row_graph (InputIterator edge_begin, InputIterator edge_end,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty());
-
- template<typename InputIterator, typename EdgePropertyIterator>
- compressed_sparse_row_graph (InputIterator edge_begin, InputIterator edge_end,
- EdgePropertyIterator ep_iter,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty());
-
- // New sorted edge list constructors (both interfaces, directed only)
+ // New sorted edge list constructors (directed only)
template<typename InputIterator>
compressed_sparse_row_graph (edges_are_sorted_t,
InputIterator edge_begin, InputIterator edge_end,
@@ -178,7 +153,7 @@ public:
edges_size_type numedges = 0,
const GraphProperty& prop = GraphProperty());
- // In-place unsorted edge list constructors (new interface and directed only)
+ // In-place unsorted edge list constructors (directed only)
template<typename InputIterator>
compressed_sparse_row_graph (construct_inplace_from_sources_and_targets_t,
std::vector<vertex_descriptor>& sources,
@@ -194,7 +169,7 @@ public:
vertices_size_type numverts,
const GraphProperty& prop = GraphProperty());
- // Miscellaneous constructors (both interfaces, directed only)
+ // Miscellaneous constructors (directed only)
template<typename Graph, typename VertexIndexMap>
compressed_sparse_row_graph (const Graph& g, const VertexIndexMap& vi,
vertices_size_type numverts,
@@ -206,7 +181,7 @@ public:
template<typename Graph>
explicit compressed_sparse_row_graph (const Graph& g);
- // Graph mutators (both interfaces, directed only)
+ // Graph mutators (directed only)
template<typename Graph, typename VertexIndexMap>
void assign (const Graph& g, const VertexIndexMap& vi,
vertices_size_type numverts, edges_size_type numedges);
@@ -217,51 +192,46 @@ public:
template<typename Graph>
void assign (const Graph& g);
- // Property Access (both interfaces)
+ // Property Access
VertexProperty& operator[] (vertex_descriptor v);
const VertexProperty& operator[] (vertex_descriptor v) const;
EdgeProperty& operator[] (edge_descriptor v);
const EdgeProperty& operator[] (edge_descriptor v) const;
};
-// Incidence Graph requirements (both interfaces)
+// Incidence Graph requirements
vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&);
vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&);
std::pair<out_edge_iterator, out_edge_iterator>
out_edges(vertex_descriptor, const compressed_sparse_row_graph&);
degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&);
-// Bidirectional Graph requirements (new interface and bidirectional only)
+// Bidirectional Graph requirements (bidirectional only)
std::pair<in_edge_iterator, in_edge_iterator>
in_edges(vertex_descriptor, const compressed_sparse_row_graph&);
degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&);
-// Adjacency Graph requirements (both interfaces)
+// Adjacency Graph requirements
std::pair<adjacency_iterator, adjacency_iterator>
adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&);
-// Vertex List Graph requirements (both interfaces)
+// Vertex List Graph requirements
std::pair<vertex_iterator, vertex_iterator> vertices(const compressed_sparse_row_graph&);
vertices_size_type num_vertices(const compressed_sparse_row_graph&);
-// Edge List Graph requirements (both interfaces)
+// Edge List Graph requirements
std::pair<edge_iterator, edge_iterator> edges(const compressed_sparse_row_graph&);
edges_size_type num_edges(const compressed_sparse_row_graph&);
-// Vertex access (both interfaces)
+// Vertex access
vertex_descriptor vertex (vertices_size_type i, const compressed_sparse_row_graph&);
// Edge access
-(old interface only)
-std::pair<out_edge_iterator, out_edge_iterator>
- edge_range (vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
-(both interfaces)
std::pair<edge_descriptor, bool>
edge (vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
-(both interfaces)
edge_descriptor edge_from_index (edges_size_type i, const compressed_sparse_row_graph&);
-// Property map accessors (both interfaces)
+// Property map accessors
template<typename PropertyTag >
property_map<compressed_sparse_row_graph, PropertyTag>::type
get (PropertyTag, compressed_sparse_row_graph& g)
@@ -290,31 +260,19 @@ void set_property (const compressed_sparse_row_graph&
const typename graph_property<compressed_sparse_row_graph, GraphPropertyTag>::type& value);
// Incremental construction functions
-(old interface only)
-template<typename Graph>
-vertex_descriptor add_vertex (compressed_sparse_row_graph& g);
-
-(old interface only)
-template<typename Graph>
-vertex_descriptor add_vertices (vertices_size_type count, compressed_sparse_row_graph& g);
-
-(old interface only)
-template<typename Graph>
-edge_descriptor add_edge (vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph& g);
-
-(new interface and directed only)
+(directed only)
template<typename InputIterator, typename Graph>
void add_edges (InputIterator first, InputIterator last, compressed_sparse_row_graph& g);
-(new interface and directed only)
+(directed only)
template<typename InputIterator, typename EPIter, typename Graph>
void add_edges (InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph& g);
-(new interface and directed only)
+(directed only)
template<typename BidirectionalIterator, typename Graph>
void add_edges_sorted (BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph& g);
-(new interface and directed only)
+(directed only)
template<typename BidirectionalIterator, typename EPIter, typename Graph>
void add_edges_sorted (BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph& g);
@@ -359,8 +317,9 @@ void add_edges_sorted (BidirectionalIterator
A selector that determines whether the graph will be directed,
bidirectional or undirected. At this time, the CSR graph type
- only supports directed graphs, so this value must
- be boost::directedS.
+ only supports directed and bidirectional graphs, so this value must
+ be either boost::directedS or
+ boost::bidirectionalS.
Default : boost::directedS
@@ -465,7 +424,6 @@ void add_edges_sorted (BidirectionalIterator
edge_end) do not need to be sorted. This constructor uses extra
memory to save the edge information before adding it to the graph,
avoiding the requirement for the iterator to have multi-pass capability.
- (This function is only provided by the new interface.)
@@ -498,7 +456,6 @@ void add_edges_sorted (BidirectionalIterator
edge_begin to edge_end . This constructor uses extra
memory to save the edge information before adding it to the graph,
avoiding the requirement for the iterator to have multi-pass capability.
- (This function is only provided by the new interface.)
@@ -523,7 +480,6 @@ void add_edges_sorted (BidirectionalIterator
numverts). The edges in [edge_begin,
edge_end) do not need to be sorted. Multiple passes will be made
over the edge range.
- (This function is only provided by the new interface.)
@@ -555,7 +511,6 @@ void add_edges_sorted (BidirectionalIterator
of the graph, where m is distance from
edge_begin to edge_end . Multiple passes will be made
over the edge and property ranges.
- (This function is only provided by the new interface.)
@@ -584,9 +539,7 @@ void add_edges_sorted (BidirectionalIterator
numverts). The edges in [edge_begin,
edge_end) must be sorted so that all edges originating
from vertex i preceed any edges originating from all
- vertices j where j > i . (The version of this
- constructor without the edges_are_sorted tag is deprecated and
- only provided by the old interface.)
+ vertices j where j > i .
@@ -624,9 +577,7 @@ void add_edges_sorted (BidirectionalIterator
EdgeProperty . The iterator range [ep_iter, ep_ter +
m) will be used to initialize the properties on the edges
of the graph, where m is distance from
- edge_begin to edge_end . (The version of this
- constructor without the edges_are_sorted tag is deprecated and
- only provided by the old interface.)
+ edge_begin to edge_end .
@@ -647,7 +598,6 @@ void add_edges_sorted (BidirectionalIterator
share storage with the constructed graph (and so are safe to destroy).
The parameter prop, if provided, is used to initialize the
graph property.
- (This function is only provided by the new interface.)
@@ -670,7 +620,6 @@ void add_edges_sorted (BidirectionalIterator
not share storage with the constructed graph (and so are safe to
destroy). The parameter prop, if provided, is used to
initialize the graph property.
- (This function is only provided by the new interface.)
@@ -774,20 +723,6 @@ void add_edges_sorted (BidirectionalIterator
- Edge access
-
- std::pair<out_edge_iterator, out_edge_iterator>
- edge_range(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
-
-
-
- Returns all edges from u to v . Requires time
- logarithmic in the number of edges outgoing from u .
- (This function is only provided by the old interface.)
-
-
-
-
std::pair<edge_descriptor, bool>
edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&);
@@ -799,9 +734,8 @@ void add_edges_sorted (BidirectionalIterator
second value in the pair will be false . If multiple
edges exist from u to v , the first edge will
be returned; use edge_range
- to retrieve all edges. This function requires time logarithmic in the
- number of edges outgoing from u for the old interface, and
- linear time for the new interface.
+ to retrieve all edges. This function requires linear time in the
+ number of edges outgoing from u .
@@ -898,47 +832,6 @@ void set_property(const compressed_sparse_row_graph& g, GraphPropertyTag,
-
-vertex_descriptor add_vertex(compressed_sparse_row_graph& g)
-
-
-
- Add a new vertex to the end of the graph g , and return a
- descriptor for that vertex. The new vertex will be greater than any of
- the previous vertices in g .
- (This function is only provided by the old interface.)
-
-
-
-
-
-vertex_descriptor add_vertices(vertices_size_type count, compressed_sparse_row_graph& g)
-
-
-
- Add count new vertices to the end of the graph g , and
- return a descriptor for the smallest new vertex. The new vertices will
- be greater than any of the previous vertices in g .
- (This function is only provided by the old interface.)
-
-
-
-
-
-edge_descriptor add_edge(vertex_descriptor src, vertex_descriptor tgt, compressed_sparse_row_graph& g)
-
-
-
- Add a new edge from src to tgt in the graph g ,
- and return a descriptor for it. There must not be an edge in g
- whose source vertex is greater than src . If the vertex
- src has out edges before this operation is called, there must be
- none whose target is larger than tgt .
- (This function is only provided by the old interface.)
-
-
-
-
template<typename InputIterator>
void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph& g)
@@ -951,7 +844,6 @@ void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_gr
whose value_type is an std::pair of integer
values. These integer values are the source and target vertices of the
new edges. The edges do not need to be sorted.
- (This function is only provided by the new interface.)
@@ -972,7 +864,6 @@ void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter
of EPIter must be the edge property type of the graph. The
integer values produced by the InputIterator are the source and
target vertices of the new edges. The edges do not need to be sorted.
- (This function is only provided by the new interface.)
@@ -990,7 +881,6 @@ void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, c
values. These integer values are the source and target vertices of the
new edges. The edges must be sorted in increasing order by source vertex
index.
- (This function is only provided by the new interface.)
@@ -1013,7 +903,6 @@ void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, E
property type of the graph.
The edges must be sorted in increasing order by source vertex
index.
- (This function is only provided by the new interface.)
diff --git a/doc/index.html b/doc/index.html
index 19e313c8..37830da0 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -1,3 +1,5 @@
+
+
The Boost Graph Library
-
-
-
-
+
+
The Boost Graph Library (BGL)
-
+
@@ -28,12 +29,12 @@ standardized generic interface for traversing graphs is of utmost
importance to encourage reuse of graph algorithms and data structures.
Part of the Boost Graph Library is a generic interface that allows
access to a graph's structure, but hides the details of the
-implementation. This is an ``open'' interface in the sense that any
+implementation. This is an “open” interface in the sense that any
graph library that implements this interface will be interoperable
with the BGL generic algorithms and with other algorithms that also
use this interface. The BGL provides some general purpose graph classes
that conform to this interface, but they are not meant to be the
-``only'' graph classes; there certainly will be other graph classes
+“only” graph classes; there certainly will be other graph classes
that are better for certain situations. We believe that the main
contribution of the The BGL is the formulation of this interface.
@@ -49,7 +50,9 @@ programming in the context of graphs.
Of course, if you are already familiar with generic programming,
please dive right in! Here's the Table of Contents .
+href="./table_of_contents.html">Table of Contents. For distributed-memory
+parallelism, you can also look at the Parallel BGL .
The source for the BGL is available as part of the Boost distribution,
@@ -62,7 +65,7 @@ does not need to be built to be used. The only exception is the GraphViz input parser .
When compiling programs that use the BGL, be sure to compile
-with optimization . For instance, select "Release" mode with
+with optimization. For instance, select “Release” mode with
Microsoft Visual C++ or supply the flag -O2 or -O3
to GCC.
@@ -108,14 +111,14 @@ handle the specifics of each problem domain.
The third way that STL is generic is that its containers are
parameterized on the element type. Though hugely important, this is
-perhaps the least ``interesting'' way in which STL is generic.
+perhaps the least “interesting” way in which STL is generic.
Generic programming is often summarized by a brief description of
parameterized lists such as std::list<T> . This hardly scratches
the surface!
-
Genericity in the Boost Graph Library
+Genericity in the Boost Graph Library
@@ -169,7 +172,7 @@ BGL graph algorithms.
Second, the graph algorithms of the BGL are extensible. The BGL introduces the
notion of a visitor , which is just a function object with
multiple methods. In graph algorithms, there are often several key
-``event points'' at which it is useful to insert user-defined
+“event points” at which it is useful to insert user-defined
operations. The visitor object has a different method that is invoked
at each event point. The particular event points and corresponding
visitor methods depend on the particular algorithm. They often
@@ -185,13 +188,13 @@ include methods like start_vertex() ,
The third way that the BGL is generic is analogous to the parameterization
of the element-type in STL containers, though again the story is a bit
more complicated for graphs. We need to associate values (called
-"properties") with both the vertices and the edges of the graph.
+“properties”) with both the vertices and the edges of the graph.
In addition, it will often be necessary to associate
multiple properties with each vertex and edge; this is what we mean
by multi-parameterization.
The STL std::list<T> class has a parameter T
for its element type. Similarly, BGL graph classes have template
-parameters for vertex and edge ``properties''. A
+parameters for vertex and edge “properties”. A
property specifies the parameterized type of the property and also assigns
an identifying tag to the property. This tag is used to distinguish
between the multiple properties which an edge or vertex may have. A
@@ -265,8 +268,8 @@ The BGL currently provides two graph classes and an edge list adaptor:
-The adjacency_list class is the general purpose ``swiss army
-knife'' of graph classes. It is highly parameterized so that it can be
+The adjacency_list class is the general purpose “swiss army
+knife” of graph classes. It is highly parameterized so that it can be
optimized for different situations: the graph is directed or
undirected, allow or disallow parallel edges, efficient access to just
the out-edges or also to the in-edges, fast vertex insertion and
diff --git a/doc/known_problems.html b/doc/known_problems.html
index a7856623..dbf042a1 100644
--- a/doc/known_problems.html
+++ b/doc/known_problems.html
@@ -44,14 +44,6 @@ versions.
"using boost::tie;" may cause VC++ internal compiler error.
-Workarounds
-
-Compiler Warnings on hash_set and hash_map . Versions of
-GCC >= 4.3 deprecate these headers and data structures and will emit warnings when
-compiling the BGL. To suppress these warnings and the hash-based storage selectors
-define the BOOST_NO_HASH prior to including any Boost.Graph headers.
-
-
diff --git a/doc/kolmogorov_max_flow.html b/doc/kolmogorov_max_flow.html
index f57a5762..2cafd055 100644
--- a/doc/kolmogorov_max_flow.html
+++ b/doc/kolmogorov_max_flow.html
@@ -216,7 +216,9 @@ of Kolmogorov. Few changes were made for increasing performance:
Vertex List Graph , Edge
List Graph and Incidence Graph .
For each edge (u,v) in the graph, the reverse edge (v,u)
-must also be in the graph.
+must also be in the graph. Performance of the algorithm will be slightly
+improved if the graph type also models Adjacency
+Matrix .
IN: vertex_descriptor src
diff --git a/doc/prim_minimum_spanning_tree.html b/doc/prim_minimum_spanning_tree.html
index 5db9439c..371a7a70 100644
--- a/doc/prim_minimum_spanning_tree.html
+++ b/doc/prim_minimum_spanning_tree.html
@@ -55,6 +55,8 @@ simply a call to dijkstra_shortest_paths()
with the appropriate choice of comparison and combine functors.
The pseudo-code for Prim's algorithm is listed below.
+The algorithm as implemented in Boost.Graph does not produce correct results on
+graphs with parallel edges.
@@ -131,7 +133,8 @@ IN: const Graph& g
An undirected graph. The type Graph must be a
model of Vertex List Graph
- and Incidence Graph .
+ and Incidence Graph . It should not
+ contain parallel edges.
Python : The parameter is named graph .
diff --git a/doc/table_of_contents.html b/doc/table_of_contents.html
index b277a077..8333941c 100644
--- a/doc/table_of_contents.html
+++ b/doc/table_of_contents.html
@@ -1,3 +1,5 @@
+
+
Table of Contents: Boost Graph Library
-
-
The Property Map Library (technically not part of the graph library, but used a lot here)
- Python bindings
+ Python bindings
Visitor Concepts
BFS Visitor
DFS Visitor
- Dijkstra Visitor
+ Dijkstra Visitor
Bellman Ford Visitor
A* Visitor
Event Visitor
@@ -114,144 +116,158 @@
Multi-dimensional grid graph
- Iterator Adaptors
-
- adjacency_iterator
- inv_adjacency_iterator
-
- Traits classes
-
- graph_traits
- adjacency_list_traits
- property_map
-
- Algorithms
-
- bgl_named_params
- Core Algorithm Patterns
-
- breadth_first_search
- breadth_first_visit
- depth_first_search
- depth_first_visit
- undirected_dfs
-
- Graph Algorithms
-
- Shortest Paths Algorithms
-
- dijkstra_shortest_paths
- dijkstra_shortest_paths_no_color_map
- bellman_ford_shortest_paths
- dag_shortest_paths
- johnson_all_pairs_shortest_paths
- floyd_warshall_all_pairs_shortest_paths
- r_c_shortest_paths - resource-constrained shortest paths
-
- Minimum Spanning Tree Algorithms
-
- kruskal_minimum_spanning_tree
- prim_minimum_spanning_tree
-
- Connected Components Algorithms
+
+ Iterator Adaptors
- connected_components
- strong_components
-
- biconnected_components
- articulation_points
- Incremental Connected Components
+ adjacency_iterator
+ inv_adjacency_iterator
+
+ Traits classes
+
+ graph_traits
+ adjacency_list_traits
+ property_map
+
+ Algorithms
+
+ Named parameters (used in many graph algorithms)
+ Basic Operations
+
+ copy_graph
+ transpose_graph
+
+ Core Searches
+ breadth_first_search
+ breadth_first_visit
+ depth_first_search
+ depth_first_visit
+ undirected_dfs
+
+
+ Other Core Algorithms
+
+ topological_sort
+ transitive_closure
+ lengauer_tarjan_dominator_tree
+
+
+ Shortest Paths / Cost Minimization Algorithms
+
+ dijkstra_shortest_paths
+ dijkstra_shortest_paths_no_color_map
+ bellman_ford_shortest_paths
+ dag_shortest_paths
+ johnson_all_pairs_shortest_paths
+ floyd_warshall_all_pairs_shortest_paths
+ r_c_shortest_paths - resource-constrained shortest paths
+ astar_search
+
+ Minimum Spanning Tree Algorithms
+
+ kruskal_minimum_spanning_tree
+ prim_minimum_spanning_tree
+
+ Connected Components Algorithms
+
+ connected_components
+ strong_components
+
+ biconnected_components
+ articulation_points
+ Incremental Connected Components
+
initialize_incremental_components
incremental_components
same_component
component_index
-
-
- Maximum Flow and Matching Algorithms
-
- edmonds_karp_max_flow
- push_relabel_max_flow
- kolmogorov_max_flow
- edmonds_maximum_cardinality_matching
-
+
+
+ Maximum Flow and Matching Algorithms
+
+ edmonds_karp_max_flow
+ push_relabel_max_flow
+ kolmogorov_max_flow
+ edmonds_maximum_cardinality_matching
+
- Sparse Matrix Ordering Algorithms
-
- cuthill_mckee_ordering
- king_ordering
- minimum_degree_ordering
+ Sparse Matrix Ordering Algorithms
+
+ cuthill_mckee_ordering
+ king_ordering
+ minimum_degree_ordering
+ sloan_ordering
+ sloan_start_end_vertices
+
+
+ Graph Metrics
+
+ ith_wavefront , max_wavefront , aver_wavefront , and rms_wavefront
+ bandwidth
+ ith_bandwidth
+ brandes_betweenness_centrality
+ minimum_cycle_ratio and maximum_cycle_ratio
+
+
+ Graph Structure Comparisons
+
+ isomorphism
+ mcgregor_common_subgraphs
+
+
+ Layout Algorithms
+
+ random_graph_layout
+ circle_layout
+ kamada_kawai_spring_layout
+ fruchterman_reingold_force_directed_layout
+ gursoy_atun_layout
-
- topological_sort
- transitive_closure
- copy_graph
- transpose_graph
- isomorphism
-
- Path and Tour Algorithms
-
- metric_tsp_approx
-
-
-
- sequential_vertex_coloring
- sloan_ordering
- sloan_start_end_vertices
-
- ith_wavefront , max_wavefront , aver_wavefront , and rms_wavefront
- brandes_betweenness_centrality
- Layout algorithms
+
+ Clustering algorithms
- random_graph_layout
- circle_layout
- kamada_kawai_spring_layout
- fruchterman_reingold_force_directed_layout
- gursoy_atun_layout
-
-
- Clustering algorithms
-
- betweenness_centrality_clustering
-
-
- astar_search
- lengauer_tarjan_dominator_tree
- minimum_cycle_ratio and maximum_cycle_ratio
- Planar Graph Algorithms
-
-
- boyer_myrvold_planarity_test
-
- planar_face_traversal
-
- planar_canonical_ordering
-
- chrobak_payne_straight_line_drawing
-
- is_straight_line_drawing
-
- is_kuratowski_subgraph
-
- make_connected
-
- make_biconnected_planar
-
- make_maximal_planar
-
- lengauer_tarjan_dominator_tree
- mcgregor_common_subgraphs
-
-
+ betweenness_centrality_clustering
+
+
+ Planar Graph Algorithms
+
+
+ boyer_myrvold_planarity_test
+
+ planar_face_traversal
+
+ planar_canonical_ordering
+
+ chrobak_payne_straight_line_drawing
+
+ is_straight_line_drawing
+
+ is_kuratowski_subgraph
+
+ make_connected
+
+ make_biconnected_planar
+
+ make_maximal_planar
+
+
+ Miscellaneous Algorithms
+
+ metric_tsp_approx
+ sequential_vertex_coloring
+
+
+
+
Graph Input/Output
@@ -268,18 +284,16 @@
BasicMatrix
incident
opposite
- bandwidth
- ith_bandwidth
Tools for random graphs
random_vertex
random_edge
generate_random_graph
randomize_property
- erdos_renyi_iterator
- sorted_erdos_renyi_iterator
- plod_iterator
- small_world_iterator
+ erdos_renyi_iterator
+ sorted_erdos_renyi_iterator
+ plod_iterator
+ small_world_iterator
Challenge and To-Do List
diff --git a/doc/transitive_closure.html b/doc/transitive_closure.html
index e8793304..58c33182 100644
--- a/doc/transitive_closure.html
+++ b/doc/transitive_closure.html
@@ -56,8 +56,9 @@ Thanks to Vladimir Prus for the implementation of this algorithm!
IN: const Graph& g
A directed graph, where the Graph type must model the
- Vertex List Graph
- and Adjacency Graph concepts.
+ Vertex List Graph ,
+ Adjacency Graph ,
+ and Adjacency Matrix concepts.
Python : The parameter is named graph .
diff --git a/example/labeled_graph.cpp b/example/labeled_graph.cpp
index b1d8c243..fdcdd4b6 100644
--- a/example/labeled_graph.cpp
+++ b/example/labeled_graph.cpp
@@ -7,8 +7,6 @@
#include
#include
-#define BOOST_NO_HASH
-
#include
#include
diff --git a/include/boost/graph/adjacency_list.hpp b/include/boost/graph/adjacency_list.hpp
index 6ba8f435..625ab24d 100644
--- a/include/boost/graph/adjacency_list.hpp
+++ b/include/boost/graph/adjacency_list.hpp
@@ -17,16 +17,7 @@
#include
#include
-// TODO: Deprecating this requires some cooperation from Boost.Config. It's not
-// a good idea to just refuse the inclusion because it could break otherwise
-// functioning code.
-#if !defined BOOST_NO_HASH
-# ifdef BOOST_HASH_SET_HEADER
-# include BOOST_HASH_SET_HEADER
-# else
-# include
-# endif
-#endif
+#include
#if !defined BOOST_NO_SLIST
# ifdef BOOST_SLIST_HEADER
@@ -73,12 +64,10 @@ namespace boost {
struct mapS { };
struct multisetS { };
struct multimapS { };
-#if !defined BOOST_NO_HASH
struct hash_setS { };
struct hash_mapS { };
struct hash_multisetS { };
struct hash_multimapS { };
-#endif
template
struct container_gen { };
@@ -118,27 +107,25 @@ namespace boost {
typedef std::multiset type;
};
-#if !defined BOOST_NO_HASH
template
struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set type;
+ typedef boost::unordered_set type;
};
template
struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set type;
+ typedef boost::unordered_set type;
};
template
struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset type;
+ typedef boost::unordered_multiset type;
};
template
struct container_gen {
- typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset type;
+ typedef boost::unordered_multiset type;
};
-#endif
#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
@@ -180,27 +167,25 @@ namespace boost {
struct bind_ { typedef std::multiset > type; };
};
-#if !defined BOOST_NO_HASH
struct hash_setS {
template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set > type; };
+ struct bind_ { typedef boost::unordered_set type; };
};
struct hash_mapS {
template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set > type; };
+ struct bind_ { typedef boost::unordered_set type; };
};
struct hash_multisetS {
template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset > type; };
+ struct bind_ { typedef boost::unordered_multiset type; };
};
struct hash_multimapS {
template
- struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset > type; };
+ struct bind_ { typedef boost::unordered_multiset type; };
};
-#endif
template struct container_selector {
typedef vecS type;
@@ -216,9 +201,7 @@ namespace boost {
BOOST_CONTAINER_SELECTOR(mapS);
BOOST_CONTAINER_SELECTOR(setS);
BOOST_CONTAINER_SELECTOR(multisetS);
-#if !defined BOOST_NO_HASH
BOOST_CONTAINER_SELECTOR(hash_mapS);
-#endif
#if !defined BOOST_NO_SLIST
BOOST_CONTAINER_SELECTOR(slistS);
#endif
@@ -256,24 +239,20 @@ namespace boost {
struct parallel_edge_traits {
typedef allow_parallel_edge_tag type; };
-#if !defined BOOST_NO_HASH
template <>
struct parallel_edge_traits {
typedef disallow_parallel_edge_tag type;
};
-#endif
// mapS is obsolete, replaced with setS
template <>
struct parallel_edge_traits {
typedef disallow_parallel_edge_tag type; };
-#if !defined BOOST_NO_HASH
template <>
struct parallel_edge_traits {
typedef disallow_parallel_edge_tag type;
};
-#endif
namespace detail {
template struct is_random_access {
diff --git a/include/boost/graph/adjacency_list_io.hpp b/include/boost/graph/adjacency_list_io.hpp
index 326d490d..91b0b465 100644
--- a/include/boost/graph/adjacency_list_io.hpp
+++ b/include/boost/graph/adjacency_list_io.hpp
@@ -94,7 +94,7 @@ void getSubset
}
inline void getSubset
-( no_property& p, const no_property& s )
+( no_property&, const no_property& )
{
}
diff --git a/include/boost/graph/adjacency_matrix.hpp b/include/boost/graph/adjacency_matrix.hpp
index cf02a1d6..a3694dab 100644
--- a/include/boost/graph/adjacency_matrix.hpp
+++ b/include/boost/graph/adjacency_matrix.hpp
@@ -925,18 +925,19 @@ namespace boost {
// Functions required by the MutableGraph concept
// O(1)
- template
+ template
std::pair::edge_descriptor, bool>
add_edge(typename adjacency_matrix::vertex_descriptor u,
typename adjacency_matrix::vertex_descriptor v,
- const EP& ep,
+ const EP2& ep,
adjacency_matrix& g)
{
typedef typename adjacency_matrix::edge_descriptor
edge_descriptor;
if (detail::get_edge_exists(g.get_edge(u,v), 0) == false) {
++(g.m_num_edges);
- detail::set_property(g.get_edge(u,v), ep, 0);
+ detail::set_property(g.get_edge(u,v), EP(ep), 0);
detail::set_edge_exists(g.get_edge(u,v), true, 0);
return std::make_pair
(edge_descriptor(true, u, v, &detail::get_property(g.get_edge(u,v))),
@@ -989,9 +990,10 @@ namespace boost {
return *vertices(g).first;
}
- template
+ template
inline typename adjacency_matrix::vertex_descriptor
- add_vertex(const VP& vp, adjacency_matrix& g) {
+ add_vertex(const VP2& /*vp*/, adjacency_matrix& g) {
// UNDER CONSTRUCTION
assert(false);
return *vertices(g).first;
@@ -999,8 +1001,8 @@ namespace boost {
template
inline void
- remove_vertex(typename adjacency_matrix::vertex_descriptor u,
- adjacency_matrix& g)
+ remove_vertex(typename adjacency_matrix::vertex_descriptor /*u*/,
+ adjacency_matrix& /*g*/)
{
// UNDER CONSTRUCTION
assert(false);
@@ -1298,7 +1300,7 @@ namespace boost {
template
typename adjacency_matrix::vertex_descriptor
vertex(typename adjacency_matrix::vertices_size_type n,
- const adjacency_matrix& g)
+ const adjacency_matrix&)
{
return n;
}
diff --git a/include/boost/graph/astar_search.hpp b/include/boost/graph/astar_search.hpp
index 25342e82..4f956329 100644
--- a/include/boost/graph/astar_search.hpp
+++ b/include/boost/graph/astar_search.hpp
@@ -238,9 +238,9 @@ namespace boost {
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
- ColorMap color, VertexIndexMap index_map,
+ ColorMap color, VertexIndexMap /*index_map*/,
CompareFunction compare, CombineFunction combine,
- CostInf inf, CostZero zero)
+ CostInf /*inf*/, CostZero zero)
{
typedef typename graph_traits::vertex_descriptor
Vertex;
diff --git a/include/boost/graph/biconnected_components.hpp b/include/boost/graph/biconnected_components.hpp
index ac220659..03459636 100644
--- a/include/boost/graph/biconnected_components.hpp
+++ b/include/boost/graph/biconnected_components.hpp
@@ -83,9 +83,9 @@ namespace boost
put(lowpt, source(e, g),
min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, source(e, g)),
get(dtm, target(e, g))));
+ }
vis.back_edge(e, g);
}
- }
template
void forward_or_cross_edge(const Edge& e, Graph& g)
diff --git a/include/boost/graph/bron_kerbosch_all_cliques.hpp b/include/boost/graph/bron_kerbosch_all_cliques.hpp
index bf7e3ff4..f6d253b1 100644
--- a/include/boost/graph/bron_kerbosch_all_cliques.hpp
+++ b/include/boost/graph/bron_kerbosch_all_cliques.hpp
@@ -12,6 +12,7 @@
#include
#include
+#include
#include
namespace boost {
@@ -125,9 +126,7 @@ namespace detail
typename graph_traits::vertex_descriptor v,
typename graph_traits::undirected_category)
{
- function_requires< AdjacencyMatrixConcept >();
-
- return edge(u, v, g).second;
+ return lookup_edge(u, v, g).second;
}
template
@@ -137,13 +136,12 @@ namespace detail
typename graph_traits::vertex_descriptor v,
typename graph_traits::directed_category)
{
- function_requires< AdjacencyMatrixConcept >();
// Note that this could alternate between using an || to determine
// full connectivity. I believe that this should produce strongly
// connected components. Note that using && instead of || will
// change the results to a fully connected subgraph (i.e., symmetric
// edges between all vertices s.t., if a->b, then b->a.
- return edge(u, v, g).second && edge(v, u, g).second;
+ return lookup_edge(u, v, g).second && lookup_edge(v, u, g).second;
}
template
@@ -189,7 +187,7 @@ namespace detail
for(ni = nots.begin(); ni != nend; ++ni) {
for(ci = cands.begin(); ci != cend; ++ci) {
// if we don't find an edge, then we're okay.
- if(!edge(*ni, *ci, g).second) break;
+ if(!lookup_edge(*ni, *ci, g).second) break;
}
// if we iterated all the way to the end, then *ni
// is connected to all *ci
diff --git a/include/boost/graph/clustering_coefficient.hpp b/include/boost/graph/clustering_coefficient.hpp
index c84c4802..e5f94d9f 100644
--- a/include/boost/graph/clustering_coefficient.hpp
+++ b/include/boost/graph/clustering_coefficient.hpp
@@ -10,6 +10,7 @@
#include
#include
#include
+#include
namespace boost
{
@@ -42,8 +43,8 @@ namespace detail
{
function_requires< AdjacencyMatrixConcept >();
- return (edge(u, v, g).second ? 1 : 0) +
- (edge(v, u, g).second ? 1 : 0);
+ return (lookup_edge(u, v, g).second ? 1 : 0) +
+ (lookup_edge(v, u, g).second ? 1 : 0);
}
// This template matches undirectedS
@@ -55,7 +56,7 @@ namespace detail
undirected_tag)
{
function_requires< AdjacencyMatrixConcept >();
- return edge(u, v, g).second ? 1 : 0;
+ return lookup_edge(u, v, g).second ? 1 : 0;
}
}
diff --git a/include/boost/graph/compressed_sparse_row_graph.hpp b/include/boost/graph/compressed_sparse_row_graph.hpp
index b4f01352..7b62b3b2 100644
--- a/include/boost/graph/compressed_sparse_row_graph.hpp
+++ b/include/boost/graph/compressed_sparse_row_graph.hpp
@@ -47,17 +47,6 @@
# error You will need a compiler that conforms better to the C++ standard.
#endif
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#warning "Using deprecated BGL compressed sparse row graph interface --"
-#warning "please see the documentation for the new interface and then"
-#warning "#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE before including"
-#warning ""
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#define BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-#endif
-
namespace boost {
// A tag type indicating that the graph in question is a compressed
@@ -69,7 +58,6 @@ struct csr_graph_tag;
// vertex.
enum edges_are_sorted_t {edges_are_sorted};
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
// A type (edges_are_sorted_global_t) and a value (edges_are_sorted_global)
// used to indicate that the edge list passed into the CSR graph is already
// sorted by source vertex.
@@ -122,8 +110,6 @@ enum construct_inplace_from_sources_and_targets_global_t {construct_inplace_from
// distributed CSR constructors.
enum edges_are_unsorted_global_t {edges_are_unsorted_global};
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
/****************************************************************************
* Local helper macros to reduce typing and clutter later on. *
****************************************************************************/
@@ -146,7 +132,6 @@ enum edges_are_unsorted_global_t {edges_are_unsorted_global};
compressed_sparse_row_graph
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
namespace detail {
template
struct default_construct_iterator: public boost::iterator_facade, T, boost::random_access_traversal_tag, const T&> {
@@ -179,7 +164,6 @@ namespace detail {
}
};
}
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
/** Compressed sparse row graph.
*
@@ -271,7 +255,6 @@ class compressed_sparse_row_graph
compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
@@ -327,38 +310,6 @@ class compressed_sparse_row_graph
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty())
- : m_property(prop)
- {
- m_forward.assign_from_sorted_edges(edge_begin, edge_end, identity_property_map(), keep_all(), numverts, numedges);
- inherited_vertex_properties::resize(numverts);
- }
-
- // From number of vertices and sorted list of edges (deprecated
- // interface)
- template
- compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
- EdgePropertyIterator ep_iter,
- vertices_size_type numverts,
- edges_size_type numedges = 0,
- const GraphProperty& prop = GraphProperty())
- : m_property(prop)
- {
- m_forward.assign_from_sorted_edges(edge_begin, edge_end, ep_iter, identity_property_map(), keep_all(), numverts, numedges);
- inherited_vertex_properties::resize(numverts);
- }
-
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
// From number of vertices and sorted list of edges (new interface)
template
@@ -387,7 +338,6 @@ class compressed_sparse_row_graph
compressed_sparse_row_graph(edges_are_sorted_global_t,
@@ -556,8 +506,6 @@ class compressed_sparse_row_graph
@@ -635,7 +583,6 @@ class compressed_sparse_row_graphadd_edges_internal(first, last, ep_iter, ep_iter_end, identity_property_map());
}
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
using inherited_vertex_properties::operator[];
@@ -775,8 +721,6 @@ class compressed_sparse_row_graph
@@ -1185,44 +1128,6 @@ add_vertices(typename BOOST_DIR_CSR_GRAPH_TYPE::vertices_size_type count, BOOST_
return old_num_verts_plus_one - 1;
}
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// This function requires that (src, tgt) be lexicographically at least as
-// large as the largest edge in the graph so far
-template
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt, BOOST_DIR_CSR_GRAPH_TYPE& g) {
- assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
- src < num_vertices(g));
- EdgeIndex num_edges_orig = g.m_forward.m_column.size();
- for (; g.m_last_source <= src; ++g.m_last_source)
- g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
- g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
- g.m_forward.m_column.push_back(tgt);
- typedef typename BOOST_DIR_CSR_GRAPH_TYPE::edge_push_back_type push_back_type;
- g.edge_properties().push_back(push_back_type());
- return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-
-// This function requires that src be at least as large as the largest source
-// in the graph so far
-template
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt,
- typename BOOST_DIR_CSR_GRAPH_TYPE::edge_bundled const& p,
- BOOST_DIR_CSR_GRAPH_TYPE& g) {
- assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
- src < num_vertices(g));
- EdgeIndex num_edges_orig = g.m_forward.m_column.size();
- for (; g.m_last_source <= src; ++g.m_last_source)
- g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
- g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
- g.m_forward.m_column.push_back(tgt);
- g.edge_properties().push_back(p);
- return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
// Add edges from a sorted (smallest sources first) range of pairs and edge
// properties
template
@@ -1340,21 +1244,6 @@ target(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor e,
return g.m_forward.m_column[e.idx];
}
-namespace detail {
- template
- inline EdgeIndex get_actual_row_start
- (const BOOST_CSR_GRAPH_TYPE& g,
- EdgeIndex rowstart_i_minus_1, EdgeIndex rowstart_i)
- {
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
- return rowstart_i;
-#else
- // Special case to allow incremental construction
- return (std::max)(rowstart_i_minus_1, rowstart_i);
-#endif
- }
-}
-
template
inline std::pair
@@ -1365,8 +1254,7 @@ out_edges(Vertex v, const BOOST_CSR_GRAPH_TYPE& g)
EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
return std::make_pair(it(ed(v, v_row_start)),
- it(ed(v, detail::get_actual_row_start
- (g, v_row_start, next_row_start))));
+ it(ed(v, next_row_start)));
}
template
@@ -1375,11 +1263,9 @@ out_degree(Vertex v, const BOOST_CSR_GRAPH_TYPE& g)
{
EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
- return detail::get_actual_row_start(g, v_row_start, next_row_start) - v_row_start;
+ return next_row_start - v_row_start;
}
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
template
inline std::pair
@@ -1402,8 +1288,6 @@ in_degree(Vertex v, const BOOST_BIDIR_CSR_GRAPH_TYPE& g)
return next_row_start - v_row_start;
}
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
// From AdjacencyGraph
template
inline std::pair::vertex_descriptor i,
return i;
}
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// These require that the out edges from a vertex are sorted, which is only
-// guaranteed by the old interface
-
-// Unlike for an adjacency_matrix, edge_range and edge take lg(out_degree(i))
-// time
-template
-inline std::pair
-edge_range(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
- typedef typename std::vector::const_iterator adj_iter;
- typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
- typedef typename BOOST_CSR_GRAPH_TYPE::edge_descriptor edge_desc;
- std::pair raw_adjacencies = adjacent_vertices(i, g);
- std::pair adjacencies =
- std::equal_range(raw_adjacencies.first, raw_adjacencies.second, j);
- EdgeIndex idx_begin = adjacencies.first - g.m_forward.m_column.begin();
- EdgeIndex idx_end = adjacencies.second - g.m_forward.m_column.begin();
- return std::make_pair(out_edge_iter(edge_desc(i, idx_begin)),
- out_edge_iter(edge_desc(i, idx_end)));
-}
-
-template
-inline std::pair
-edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
- typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
- std::pair range = edge_range(i, j, g);
- if (range.first == range.second)
- return std::make_pair(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(),
- false);
- else
- return std::make_pair(*range.first, true);
-}
-
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
// edge() can be provided in linear time for the new interface
template
@@ -1480,8 +1325,6 @@ edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
false);
}
-#endif // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
// Find an edge given its index in the graph
template
inline typename BOOST_CSR_GRAPH_TYPE::edge_descriptor
@@ -1491,14 +1334,7 @@ edge_from_index(EdgeIndex idx, const BOOST_CSR_GRAPH_TYPE& g)
assert (idx < num_edges(g));
row_start_iter src_plus_1 =
std::upper_bound(g.m_forward.m_rowstart.begin(),
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // This handles the case where there are some vertices
- // with rowstart 0 after the last provided vertex; this
- // case does not happen with the new interface
- g.m_forward.m_rowstart.begin() + g.m_last_source + 1,
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
g.m_forward.m_rowstart.end(),
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
idx);
// Get last source whose rowstart is at most idx
// upper_bound returns this position plus 1
diff --git a/include/boost/graph/core_numbers.hpp b/include/boost/graph/core_numbers.hpp
index 743c81f9..da072bf1 100644
--- a/include/boost/graph/core_numbers.hpp
+++ b/include/boost/graph/core_numbers.hpp
@@ -86,7 +86,7 @@ namespace boost {
template
core_numbers_visitor make_core_numbers_visitor(Visitors vis)
- { return core_numbers_visitor(vis); };
+ { return core_numbers_visitor(vis); }
typedef core_numbers_visitor<> default_core_numbers_visitor;
diff --git a/include/boost/graph/dag_shortest_paths.hpp b/include/boost/graph/dag_shortest_paths.hpp
index cc071de1..d8b47ac6 100644
--- a/include/boost/graph/dag_shortest_paths.hpp
+++ b/include/boost/graph/dag_shortest_paths.hpp
@@ -83,7 +83,7 @@ namespace boost {
dag_sp_dispatch2
(const VertexListGraph& g,
typename graph_traits::vertex_descriptor s,
- DistanceMap distance, WeightMap weight, ColorMap color, IndexMap id,
+ DistanceMap distance, WeightMap weight, ColorMap color, IndexMap /*id*/,
DijkstraVisitor vis, const Params& params)
{
typedef typename property_traits::value_type D;
diff --git a/include/boost/graph/depth_first_search.hpp b/include/boost/graph/depth_first_search.hpp
index 1bf06671..fcc61646 100644
--- a/include/boost/graph/depth_first_search.hpp
+++ b/include/boost/graph/depth_first_search.hpp
@@ -193,7 +193,8 @@ namespace boost {
typename graph_traits::vertex_iterator ui, ui_end;
for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
- put(color, *ui, Color::white()); vis.initialize_vertex(*ui, g);
+ Vertex u = implicit_cast(*ui);
+ put(color, u, Color::white()); vis.initialize_vertex(u, g);
}
if (start_vertex != implicit_cast(*vertices(g).first)){ vis.start_vertex(start_vertex, g);
@@ -202,9 +203,10 @@ namespace boost {
}
for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
- ColorValue u_color = get(color, *ui);
- if (u_color == Color::white()) { vis.start_vertex(*ui, g);
- detail::depth_first_visit_impl(g, *ui, vis, color, detail::nontruth2());
+ Vertex u = implicit_cast(*ui);
+ ColorValue u_color = get(color, u);
+ if (u_color == Color::white()) { vis.start_vertex(u, g);
+ detail::depth_first_visit_impl(g, u, vis, color, detail::nontruth2());
}
}
}
diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp
index c02a310b..674942e1 100644
--- a/include/boost/graph/detail/adjacency_list.hpp
+++ b/include/boost/graph/detail/adjacency_list.hpp
@@ -1183,13 +1183,11 @@ namespace boost {
multisetS*)
{ return edge_range(source(e, g), target(e, g), g); }
-#if !defined BOOST_NO_HASH
std::pair
get_parallel_edge_sublist(typename Config::edge_descriptor e,
const graph_type& g,
hash_setS*)
{ return edge_range(source(e, g), target(e, g), g); }
-#endif
// Placement of these overloaded remove_edge() functions
// inside the class avoids a VC++ bug.
@@ -2297,7 +2295,7 @@ namespace boost {
// VertexList and vertex_iterator
typedef typename container_gen::type SeqVertexList;
- typedef boost::integer_range RandVertexList;
+ typedef boost::integer_range RandVertexList;
typedef typename mpl::if_::type VertexList;
@@ -2785,8 +2783,8 @@ namespace boost {
} // namespace boost
-#if !defined(BOOST_NO_HASH) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-namespace BOOST_STD_EXTENSION_NAMESPACE {
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace boost {
#if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 )
// STLport 5 already defines a hash specialization.
diff --git a/include/boost/graph/detail/compressed_sparse_row_struct.hpp b/include/boost/graph/detail/compressed_sparse_row_struct.hpp
index 1146c77d..6b4e3913 100644
--- a/include/boost/graph/detail/compressed_sparse_row_struct.hpp
+++ b/include/boost/graph/detail/compressed_sparse_row_struct.hpp
@@ -81,17 +81,9 @@ namespace detail {
std::vector m_rowstart;
std::vector m_column;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // This member is only needed to support add_edge(), which is not provided by
- // the new interface
- Vertex m_last_source; // Last source of added edge, plus one
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
compressed_sparse_row_structure(Vertex numverts = 0)
: m_rowstart(numverts + 1, EdgeIndex(0)), m_column()
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- , m_last_source(numverts)
-#endif
{}
// Rebuild graph from number of vertices and multi-pass unsorted list of
@@ -251,7 +243,7 @@ namespace detail {
(sources.begin(), sources.end(), m_rowstart.begin(), numverts,
keep_all(), boost::make_property_map_function(global_to_local));
boost::graph::detail::histogram_sort_inplace
- (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
+ (sources.begin(), m_rowstart.begin(), numverts,
targets.begin(), boost::make_property_map_function(global_to_local));
// Now targets is the correct vector (properly sorted by source) for
// m_column
@@ -277,7 +269,7 @@ namespace detail {
(sources.begin(), sources.end(), m_rowstart.begin(), numverts,
keep_all(), boost::make_property_map_function(global_to_local));
boost::graph::detail::histogram_sort_inplace
- (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
+ (sources.begin(), m_rowstart.begin(), numverts,
targets.begin(), edge_props.begin(),
boost::make_property_map_function(global_to_local));
// Now targets is the correct vector (properly sorted by source) for
@@ -310,24 +302,12 @@ namespace detail {
for (Vertex i = 0; i != numverts; ++i) {
m_rowstart[i] = current_edge;
g_vertex v = ordered_verts_of_g[i];
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // Out edges in a single vertex are only sorted for the old interface
- EdgeIndex num_edges_before_this_vertex = current_edge;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
g_out_edge_iter ei, ei_end;
for (tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) {
m_column[current_edge++] = get(vi, target(*ei, g));
}
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- // Out edges in a single vertex are only sorted for the old interface
- std::sort(m_column.begin() + num_edges_before_this_vertex,
- m_column.begin() + current_edge);
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
}
m_rowstart[numverts] = current_edge;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
- m_last_source = numverts;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
}
// Add edges from a sorted (smallest sources first) range of pairs and edge
diff --git a/include/boost/graph/detail/histogram_sort.hpp b/include/boost/graph/detail/histogram_sort.hpp
index 9706d254..742c6f96 100644
--- a/include/boost/graph/detail/histogram_sort.hpp
+++ b/include/boost/graph/detail/histogram_sort.hpp
@@ -148,7 +148,7 @@ template
void
-histogram_sort_inplace(KeyIterator key_begin, KeyIterator key_end,
+histogram_sort_inplace(KeyIterator key_begin,
RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed
NumKeys numkeys,
Value1Iter values1,
@@ -181,7 +181,7 @@ template
void
-histogram_sort_inplace(KeyIterator key_begin, KeyIterator key_end,
+histogram_sort_inplace(KeyIterator key_begin,
RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed
NumKeys numkeys,
Value1Iter values1,
diff --git a/include/boost/graph/dll_import_export.hpp b/include/boost/graph/dll_import_export.hpp
new file mode 100644
index 00000000..cc369d1d
--- /dev/null
+++ b/include/boost/graph/dll_import_export.hpp
@@ -0,0 +1,30 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Copyright 2003 Jeremy Siek
+// Authors: Lie-Quan Lee, Jeremy Siek, and Douglas Gregor
+//
+// 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)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+#define BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+
+#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
+
+#endif // BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
diff --git a/include/boost/graph/dominator_tree.hpp b/include/boost/graph/dominator_tree.hpp
index cf0d310e..0c19a407 100644
--- a/include/boost/graph/dominator_tree.hpp
+++ b/include/boost/graph/dominator_tree.hpp
@@ -236,7 +236,7 @@ namespace boost {
lengauer_tarjan_dominator_tree_without_dfs
(const Graph& g,
const typename graph_traits::vertex_descriptor& entry,
- const IndexMap& indexMap,
+ const IndexMap& /*indexMap*/,
TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum,
DomTreePredMap domTreePredMap)
{
diff --git a/include/boost/graph/filtered_graph.hpp b/include/boost/graph/filtered_graph.hpp
index 94b634df..4c5f1783 100644
--- a/include/boost/graph/filtered_graph.hpp
+++ b/include/boost/graph/filtered_graph.hpp
@@ -192,8 +192,6 @@ namespace boost {
> edge_iterator;
typedef typename Traits::edges_size_type edges_size_type;
- typedef typename ::boost::edge_property_type::type edge_property_type;
- typedef typename ::boost::vertex_property_type::type vertex_property_type;
typedef filtered_graph_tag graph_tag;
#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
@@ -219,6 +217,22 @@ namespace boost {
VertexPredicate m_vertex_pred;
};
+ // Do not instantiate these unless needed
+ template
+ struct vertex_property_type > {
+ typedef typename vertex_property_type::type type;
+ };
+
+ template
+ struct edge_property_type > {
+ typedef typename edge_property_type::type type;
+ };
+
+
#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
template
struct vertex_bundle_type
bool floyd_warshall_init_dispatch(const VertexListGraph& g,
- DistanceMatrix& d, WeightMap w,
+ DistanceMatrix& d, WeightMap /*w*/,
const bgl_named_params& params)
{
typedef typename property_traits::value_type WM;
diff --git a/include/boost/graph/geodesic_distance.hpp b/include/boost/graph/geodesic_distance.hpp
index 042d39e4..a4d70274 100644
--- a/include/boost/graph/geodesic_distance.hpp
+++ b/include/boost/graph/geodesic_distance.hpp
@@ -83,7 +83,7 @@ struct mean_graph_distance_measure
template
inline mean_graph_distance_measure::value_type>
-measure_graph_mean_geodesic(const Graph& g, DistanceMap dist)
+measure_graph_mean_geodesic(const Graph&, DistanceMap)
{
typedef typename property_traits::value_type T;
return mean_graph_distance_measure();
diff --git a/include/boost/graph/graph_traits.hpp b/include/boost/graph/graph_traits.hpp
index b86ef0a8..89687b5d 100644
--- a/include/boost/graph/graph_traits.hpp
+++ b/include/boost/graph/graph_traits.hpp
@@ -181,6 +181,16 @@ namespace boost {
>::value
>
{ };
+
+ template
+ struct is_adjacency_matrix
+ : mpl::bool_<
+ is_convertible<
+ typename graph_traits::traversal_category,
+ adjacency_matrix_tag
+ >::value
+ >
+ { };
//@}
/** @name Directed Graph Traits
diff --git a/include/boost/graph/graphml.hpp b/include/boost/graph/graphml.hpp
index f6256a0f..2193b4ce 100644
--- a/include/boost/graph/graphml.hpp
+++ b/include/boost/graph/graphml.hpp
@@ -16,70 +16,20 @@
#include
#include
#include
+#include
#include // for exceptions
#include
#include
#include
#include
#include
-#if 0 // Change this back later
#include
-#endif
#include
#include
namespace boost
{
- // FIXME: Remove this once property_tree is stable
- namespace graph_detail_from_property_tree {
-
-// ----------------------------------------------------------------------------
-// Copyright (C) 2002-2006 Marcin Kalicinski
-//
-// 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)
-//
-// For more information, see www.boost.org
-// ----------------------------------------------------------------------------
-
- // Naively convert narrow string to another character type
- template
- std::basic_string widen(const char *text)
- {
- std::basic_string result;
- while (*text)
- {
- result += Ch(*text);
- ++text;
- }
- return result;
- }
-
- template
- std::basic_string encode_char_entities(const std::basic_string &s)
- {
- typedef typename std::basic_string Str;
- Str r;
- typename Str::const_iterator end = s.end();
- for (typename Str::const_iterator it = s.begin(); it != end; ++it)
- {
- switch (*it)
- {
- case Ch('<'): r += boost::graph_detail_from_property_tree::widen("<"); break;
- case Ch('>'): r += boost::graph_detail_from_property_tree::widen(">"); break;
- case Ch('&'): r += boost::graph_detail_from_property_tree::widen("&"); break;
- case Ch('"'): r += boost::graph_detail_from_property_tree::widen("""); break;
- case Ch('\''): r += boost::graph_detail_from_property_tree::widen("'"); break;
- default: r += *it; break;
- }
- }
- return r;
- }
-
- }
-
/////////////////////////////////////////////////////////////////////////////
// Graph reader exceptions
/////////////////////////////////////////////////////////////////////////////
@@ -279,8 +229,7 @@ write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index,
typedef typename graph_traits::edge_descriptor edge_descriptor;
typedef typename graph_traits::vertex_descriptor vertex_descriptor;
- // using boost::property_tree::xml_parser::encode_char_entities;
- using boost::graph_detail_from_property_tree::encode_char_entities;
+ using boost::property_tree::xml_parser::encode_char_entities;
BOOST_STATIC_CONSTANT(bool,
graph_is_directed =
diff --git a/include/boost/graph/graphviz.hpp b/include/boost/graph/graphviz.hpp
index c1f87375..52f3468a 100644
--- a/include/boost/graph/graphviz.hpp
+++ b/include/boost/graph/graphviz.hpp
@@ -24,20 +24,7 @@
#include
#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
+#include
namespace boost {
diff --git a/include/boost/graph/grid_graph.hpp b/include/boost/graph/grid_graph.hpp
index 27cc256b..bda68d51 100644
--- a/include/boost/graph/grid_graph.hpp
+++ b/include/boost/graph/grid_graph.hpp
@@ -208,7 +208,7 @@ namespace boost {
const Graph* m_graph;
};
- }; // namespace detail
+ } // namespace detail
//===========
// Grid Graph
diff --git a/include/boost/graph/howard_cycle_ratio.hpp b/include/boost/graph/howard_cycle_ratio.hpp
index 709499ff..119499a3 100644
--- a/include/boost/graph/howard_cycle_ratio.hpp
+++ b/include/boost/graph/howard_cycle_ratio.hpp
@@ -173,8 +173,8 @@ namespace boost {
virtual ~mcr_howard() {}
protected:
- virtual void store_critical_edge(edge_t ed, critical_cycle_t &cc) {}
- virtual void store_critical_cycle(critical_cycle_t &cc) {}
+ virtual void store_critical_edge(edge_t, critical_cycle_t &) {}
+ virtual void store_critical_cycle(critical_cycle_t &) {}
private:
/*!
@@ -216,10 +216,10 @@ namespace boost {
tie(oei, oeie) = out_edges(*vi, m_g);
typename graph_traits::out_edge_iterator mei =
std::max_element(oei, oeie,
- bind(m_cmp,
- bind(&EdgeWeight1::operator[], m_ew1m, _1),
- bind(&EdgeWeight1::operator[], m_ew1m, _2)
- )
+ boost::bind(m_cmp,
+ boost::bind(&EdgeWeight1::operator[], m_ew1m, _1),
+ boost::bind(&EdgeWeight1::operator[], m_ew1m, _2)
+ )
);
if (mei == oeie)
{
@@ -334,10 +334,10 @@ namespace boost {
tie(uv_itr, vie) = vertices(m_g);
float_t mcr = m_bound;
while ( (uv_itr = std::find_if(uv_itr, vie,
- bind(std::equal_to(),
- my_white,
- bind(&color_map_t::operator[], vcm_, _1)
- )
+ boost::bind(std::equal_to(),
+ my_white,
+ boost::bind(&color_map_t::operator[], vcm_, _1)
+ )
)
) != vie )
///While there are undiscovered vertices
diff --git a/include/boost/graph/is_straight_line_drawing.hpp b/include/boost/graph/is_straight_line_drawing.hpp
index 1377e3e9..6b7c3905 100644
--- a/include/boost/graph/is_straight_line_drawing.hpp
+++ b/include/boost/graph/is_straight_line_drawing.hpp
@@ -100,7 +100,7 @@ namespace boost
>
bool is_straight_line_drawing(const Graph& g,
GridPositionMap drawing,
- VertexIndexMap vm
+ VertexIndexMap
)
{
diff --git a/include/boost/graph/isomorphism.hpp b/include/boost/graph/isomorphism.hpp
index 29f6ef2c..9461dc31 100644
--- a/include/boost/graph/isomorphism.hpp
+++ b/include/boost/graph/isomorphism.hpp
@@ -90,7 +90,7 @@ namespace boost {
void discover_vertex(vertex1_t v, const Graph1&) const {
vertices.push_back(v);
}
- void examine_edge(edge1_t e, const Graph1& G1) const {
+ void examine_edge(edge1_t e, const Graph1&) const {
edges.push_back(e);
}
std::vector& vertices;
diff --git a/include/boost/graph/kolmogorov_max_flow.hpp b/include/boost/graph/kolmogorov_max_flow.hpp
index 328bd303..f98a5721 100644
--- a/include/boost/graph/kolmogorov_max_flow.hpp
+++ b/include/boost/graph/kolmogorov_max_flow.hpp
@@ -46,6 +46,7 @@
#include
#include
#include
+#include
namespace boost {
namespace detail {
@@ -161,7 +162,7 @@ namespace boost {
}
edge_descriptor to_sink;
bool is_there;
- tie(to_sink, is_there) = edge(current_node, m_sink, m_g);
+ tie(to_sink, is_there) = lookup_edge(current_node, m_sink, m_g);
if(is_there){
tEdgeVal cap_from_source = m_res_cap_map[from_source];
tEdgeVal cap_to_sink = m_res_cap_map[to_sink];
diff --git a/include/boost/graph/labeled_graph.hpp b/include/boost/graph/labeled_graph.hpp
index c7f40260..d91c5983 100644
--- a/include/boost/graph/labeled_graph.hpp
+++ b/include/boost/graph/labeled_graph.hpp
@@ -72,7 +72,6 @@ namespace graph_detail {
struct generate_label_map
{ typedef std::multimap type; };
-#if !defined BOOST_NO_HASH
template
struct generate_label_map
{ typedef boost::unordered_map type; };
@@ -80,7 +79,7 @@ namespace graph_detail {
template
struct generate_label_map
{ typedef boost::unordered_multimap type; };
-#endif
+
template
struct choose_custom_map {
typedef typename generate_label_map::type type;
@@ -141,7 +140,7 @@ namespace graph_detail {
// Tag dispatch on unique associative containers (i.e. maps).
template
std::pair::vertex_descriptor, bool>
- insert_labeled_vertex(Container& c, Graph& g, Label const& l, Prop const& p,
+ insert_labeled_vertex(Container& c, Graph& g, Label const& l, Prop const&,
unique_associative_container_tag)
{
// Here, we actually have to try the insertion first, and only add
diff --git a/include/boost/graph/lookup_edge.hpp b/include/boost/graph/lookup_edge.hpp
new file mode 100644
index 00000000..f8ea89e2
--- /dev/null
+++ b/include/boost/graph/lookup_edge.hpp
@@ -0,0 +1,50 @@
+//=======================================================================
+// Copyright 2009 Trustees of Indiana University
+// Author: Jeremiah Willcock
+//
+// 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)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_LOOKUP_EDGE_HPP
+#define BOOST_GRAPH_LOOKUP_EDGE_HPP
+
+#include
+#include
+#include
+#include
+
+// lookup_edge: a function that acts like edge() but falls back to out_edges()
+// and a search when edge() is not provided.
+
+namespace boost {
+
+ template
+ std::pair::edge_descriptor, bool>
+ lookup_edge(typename boost::graph_traits::vertex_descriptor src,
+ typename boost::graph_traits::vertex_descriptor tgt,
+ const Graph& g,
+ typename boost::enable_if, int>::type = 0) {
+ return edge(src, tgt, g);
+ }
+
+ template
+ std::pair::edge_descriptor, bool>
+ lookup_edge(typename boost::graph_traits::vertex_descriptor src,
+ typename boost::graph_traits::vertex_descriptor tgt,
+ const Graph& g,
+ typename boost::disable_if, int>::type = 0) {
+ typedef typename boost::graph_traits::out_edge_iterator it;
+ typedef typename boost::graph_traits::edge_descriptor edesc;
+ std::pair oe = out_edges(src, g);
+ for (; oe.first != oe.second; ++oe.first) {
+ edesc e = *oe.first;
+ if (target(e, g) == tgt) return std::make_pair(e, true);
+ }
+ return std::make_pair(edesc(), false);
+ }
+
+}
+
+#endif // BOOST_GRAPH_LOOKUP_EDGE_HPP
diff --git a/include/boost/graph/max_cardinality_matching.hpp b/include/boost/graph/max_cardinality_matching.hpp
index ef9ed9e4..1f0f6de2 100644
--- a/include/boost/graph/max_cardinality_matching.hpp
+++ b/include/boost/graph/max_cardinality_matching.hpp
@@ -67,7 +67,7 @@ namespace boost
template
- bool is_a_matching(const Graph& g, MateMap mate, VertexIndexMap vm)
+ bool is_a_matching(const Graph& g, MateMap mate, VertexIndexMap)
{
typedef typename graph_traits::vertex_descriptor
vertex_descriptor_t;
@@ -106,13 +106,13 @@ namespace boost
typename VertexIndexMap = dummy_property_map>
struct no_augmenting_path_finder
{
- no_augmenting_path_finder(const Graph& g, MateMap mate, VertexIndexMap vm)
+ no_augmenting_path_finder(const Graph&, MateMap, VertexIndexMap)
{ }
inline bool augment_matching() { return false; }
template
- void get_current_matching(PropertyMap p) {}
+ void get_current_matching(PropertyMap) {}
};
@@ -673,13 +673,13 @@ namespace boost
}
template
- void start_vertex(Vertex v, Graph&)
+ void start_vertex(Vertex, Graph&)
{
m_parity = false;
}
template
- void discover_vertex(Vertex u, Graph&)
+ void discover_vertex(Vertex, Graph&)
{
m_parity = !m_parity;
m_parity ? ++m_count : --m_count;
@@ -703,7 +703,7 @@ namespace boost
struct no_matching_verifier
{
inline static bool
- verify_matching(const Graph& g, MateMap mate, VertexIndexMap vm)
+ verify_matching(const Graph&, MateMap, VertexIndexMap)
{ return true;}
};
diff --git a/include/boost/graph/mcgregor_common_subgraphs.hpp b/include/boost/graph/mcgregor_common_subgraphs.hpp
index 25db09ca..51eea889 100644
--- a/include/boost/graph/mcgregor_common_subgraphs.hpp
+++ b/include/boost/graph/mcgregor_common_subgraphs.hpp
@@ -89,7 +89,7 @@ namespace boost {
template
- bool operator()(const ItemFirst& item1, const ItemSecond& item2) {
+ bool operator()(const ItemFirst&, const ItemSecond&) {
return (true);
}
};
@@ -113,7 +113,7 @@ namespace boost {
(const GraphFirst& graph1,
const GraphSecond& graph2,
CorrespondenceMapFirstToSecond correspondence_map_1_to_2,
- CorrespondenceMapSecondToFirst correspondence_map_2_to_1,
+ CorrespondenceMapSecondToFirst /*correspondence_map_2_to_1*/,
typename graph_traits::vertices_size_type subgraph_size,
typename graph_traits::vertex_descriptor new_vertex1,
typename graph_traits::vertex_descriptor new_vertex2,
diff --git a/include/boost/graph/metric_tsp_approx.hpp b/include/boost/graph/metric_tsp_approx.hpp
index ff257ab7..7c18b8e0 100644
--- a/include/boost/graph/metric_tsp_approx.hpp
+++ b/include/boost/graph/metric_tsp_approx.hpp
@@ -34,6 +34,7 @@
#include
#include
#include
+#include
namespace boost
@@ -68,11 +69,11 @@ namespace boost
PreorderTraverser(std::vector& p) : path_(p) {}
- void preorder(Node n, const Tree& t)
+ void preorder(Node n, const Tree&)
{ path_.push_back(n); }
- void inorder(Node n, const Tree& t) const {}
- void postorder(Node, const Tree& t) const {}
+ void inorder(Node, const Tree&) const {}
+ void postorder(Node, const Tree&) const {}
const_iterator begin() const { return path_.begin(); }
const_iterator end() const { return path_.end(); }
@@ -241,7 +242,7 @@ namespace boost
{ }
template
- void visit_vertex(Vertex v, const Graph& g)
+ void visit_vertex(Vertex v, const Graph&)
{
BOOST_CONCEPT_ASSERT((OutputIterator));
*itr_++ = v;
@@ -284,7 +285,7 @@ namespace boost
// would require revisiting the core algorithm.
Edge e;
bool found;
- tie(e, found) = edge(previous_, v, g);
+ tie(e, found) = lookup_edge(previous_, v, g);
if(!found) {
throw not_complete();
}
diff --git a/include/boost/graph/named_function_params.hpp b/include/boost/graph/named_function_params.hpp
index 1e2647c6..42c5ef87 100644
--- a/include/boost/graph/named_function_params.hpp
+++ b/include/boost/graph/named_function_params.hpp
@@ -383,13 +383,13 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
template
struct override_const_property_t {
typedef ArgType result_type;
- result_type operator()(const Graph& g, const typename boost::add_reference::type a) const {return a;}
+ result_type operator()(const Graph&, const typename boost::add_reference::type a) const {return a;}
};
template
struct override_const_property_t {
typedef typename boost::property_map