diff --git a/doc/DijkstraVisitor.html b/doc/DijkstraVisitor.html
index e8c8c6c9..1f25bc84 100644
--- a/doc/DijkstraVisitor.html
+++ b/doc/DijkstraVisitor.html
@@ -80,7 +80,7 @@ the search.
| w |
-An object of type DistanceMap. |
+An object of type WeightMap. |
diff --git a/doc/faq.html b/doc/faq.html
index 6f491484..ff20e162 100644
--- a/doc/faq.html
+++ b/doc/faq.html
@@ -124,8 +124,8 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
not being found, such as:
../../../boost/concept_check.hpp:209: no match for
-`boost::detail::error_property_not_found & ==
- boost::detail::error_property_not_found &'
+`boost::detail::error_property_not_found & ==
+ boost::detail::error_property_not_found &'
or a message such as:
diff --git a/doc/planar_face_traversal.html b/doc/planar_face_traversal.html
index c52fa8b8..9a93799d 100644
--- a/doc/planar_face_traversal.html
+++ b/doc/planar_face_traversal.html
@@ -97,7 +97,7 @@ and might produce the output
New face: 1 2 5 4
New face: 2 3 4 5
New face: 3 0 1 4
- New face: 2 3 0 1
+ New face: 1 0 3 2
Visitor Event Points
diff --git a/doc/topology.html b/doc/topology.html
index 24271c0c..57f53e57 100644
--- a/doc/topology.html
+++ b/doc/topology.html
@@ -124,8 +124,8 @@ class convex_topology
struct point
{
point() { }
- double& operator[](std::size_t i) {return values[i];}
- const double& operator[](std::size_t i) const {return values[i];}
+ double& operator[](std::size_t i) {return values[i];}
+ const double& operator[](std::size_t i) const {return values[i];}
private:
double values[Dims];
@@ -157,7 +157,7 @@ class hypercube_topology : public convex_topology
{
public:
explicit hypercube_topology(double scaling = 1.0);
- hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0);
+ hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0);
point_type random_point() const;
};
@@ -173,13 +173,13 @@ class square_topology : public hypercube_topology<
{
public:
explicit square_topology(double scaling = 1.0);
- square_topology(RandomNumberGenerator& gen, double scaling = 1.0);
+ square_topology(RandomNumberGenerator& gen, double scaling = 1.0);
};
Class template cube_topology
-Class template cube_topology is a two-dimensional
+
Class template cube_topology is a three-dimensional
hypercube topology.
@@ -188,7 +188,7 @@ class cube_topology : public hypercube_topology
@@ -209,7 +209,7 @@ class ball_topology : public convex_topology<D
{
public:
explicit ball_topology(double radius = 1.0);
- ball_topology(RandomNumberGenerator& gen, double radius = 1.0);
+ ball_topology(RandomNumberGenerator& gen, double radius = 1.0);
point_type random_point() const;
};
@@ -225,13 +225,13 @@ class circle_topology : public ball_topology<2,
{
public:
explicit circle_topology(double radius = 1.0);
- circle_topology(RandomNumberGenerator& gen, double radius = 1.0);
+ circle_topology(RandomNumberGenerator& gen, double radius = 1.0);
};
Class template sphere_topology
-Class template sphere_topology is a two-dimensional
+
Class template sphere_topology is a three-dimensional
ball topology.
@@ -240,7 +240,7 @@ class sphere_topology : public ball_topology<3,
{
public:
explicit sphere_topology(double radius = 1.0);
- sphere_topology(RandomNumberGenerator& gen, double radius = 1.0);
+ sphere_topology(RandomNumberGenerator& gen, double radius = 1.0);
};
@@ -258,7 +258,7 @@ class heart_topology
typedef unspecified point_type;
heart_topology();
- heart_topology(RandomNumberGenerator& gen);
+ heart_topology(RandomNumberGenerator& gen);
point_type random_point() const;
double distance(point_type a, point_type b) const;
point_type move_position_toward(point_type a, double fraction, point_type b) const;
diff --git a/example/bipartite_example.cpp b/example/bipartite_example.cpp
index 05dd9cd8..c8e62ad2 100644
--- a/example/bipartite_example.cpp
+++ b/example/bipartite_example.cpp
@@ -31,7 +31,7 @@ void print_bipartite (const Graph& g)
if (bipartite)
{
typedef std::vector partition_t;
- typedef vec_adj_list_vertex_id_map index_map_t;
+ typedef typename property_map ::type index_map_t;
typedef iterator_property_map partition_map_t;
partition_t partition (num_vertices (g));
diff --git a/include/boost/graph/adjacency_list_io.hpp b/include/boost/graph/adjacency_list_io.hpp
index 91b0b465..547c0290 100644
--- a/include/boost/graph/adjacency_list_io.hpp
+++ b/include/boost/graph/adjacency_list_io.hpp
@@ -215,7 +215,7 @@ struct PropertyPrinter
template
PropertyPrinter& operator () ( std::ostream& out, const Val& v )
{
- typename property_map::type ps = get(Tag(), *graph);
+ typename property_map::const_type ps = get(Tag(), *graph);
out << ps[ v ] <<" ";
PropertyPrinter print(*graph);
print(out, v);
@@ -248,7 +248,7 @@ struct PropertyPrinter >
template
PropertyPrinter& operator () ( std::ostream& out, const Val& v )
{
- typename property_map::type ps = get(Tag(), *graph);
+ typename property_map::const_type ps = get(Tag(), *graph);
out << ps[ v ] <<" ";
PropertyPrinter print(*graph);
print(out, v);
diff --git a/include/boost/graph/astar_search.hpp b/include/boost/graph/astar_search.hpp
index 316e7063..132dca02 100644
--- a/include/boost/graph/astar_search.hpp
+++ b/include/boost/graph/astar_search.hpp
@@ -158,6 +158,7 @@ namespace boost {
template
void tree_edge(Edge e, const Graph& g) {
+ using boost::get;
m_decreased = relax(e, g, m_weight, m_predecessor, m_distance,
m_combine, m_compare);
@@ -173,6 +174,7 @@ namespace boost {
template
void gray_target(Edge e, const Graph& g) {
+ using boost::get;
m_decreased = relax(e, g, m_weight, m_predecessor, m_distance,
m_combine, m_compare);
@@ -189,6 +191,7 @@ namespace boost {
template
void black_target(Edge e, const Graph& g) {
+ using boost::get;
m_decreased = relax(e, g, m_weight, m_predecessor, m_distance,
m_combine, m_compare);
diff --git a/include/boost/graph/biconnected_components.hpp b/include/boost/graph/biconnected_components.hpp
index 9586f9a2..0fdbad0d 100644
--- a/include/boost/graph/biconnected_components.hpp
+++ b/include/boost/graph/biconnected_components.hpp
@@ -28,17 +28,23 @@ namespace boost
{
template
struct biconnected_components_visitor : public dfs_visitor<>
{
biconnected_components_visitor
- (ComponentMap comp, std::size_t& c, DiscoverTimeMap dtm,
+ (ComponentMap comp, std::size_t& c,
+ std::size_t& children_of_root, DiscoverTimeMap dtm,
std::size_t& dfs_time, LowPointMap lowpt, PredecessorMap pred,
- OutputIterator out, Stack& S, DFSVisitor vis)
- : comp(comp), c(c), children_of_root(0), dtm(dtm),
- dfs_time(dfs_time), lowpt(lowpt),
- pred(pred), out(out), S(S), vis(vis) { }
+ OutputIterator out, Stack& S,
+ ArticulationVector& is_articulation_point, IndexMap index_map,
+ DFSVisitor vis)
+ : comp(comp), c(c), children_of_root(children_of_root),
+ dtm(dtm), dfs_time(dfs_time), lowpt(lowpt),
+ pred(pred), out(out), S(S),
+ is_articulation_point(is_articulation_point),
+ index_map(index_map), vis(vis) { }
template
void initialize_vertex(const Vertex& u, Graph& g)
@@ -89,8 +95,7 @@ namespace boost
typename boost::graph_traits::vertex_descriptor src = source(e, g);
typename boost::graph_traits::vertex_descriptor tgt = target(e, g);
- if ( ( tgt != get(pred, src) || get(pred, src) == src ) &&
- get(dtm, tgt) < get(dtm, src) ) {
+ if ( tgt != get(pred, src) ) {
S.push(e);
put(lowpt, src,
min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, src),
@@ -111,40 +116,41 @@ namespace boost
BOOST_USING_STD_MIN();
Vertex parent = get(pred, u);
if (parent == u) { // Root of tree is special
- if (children_of_root >= 2) {
- *out++ = u;
- }
- return;
- }
- put(lowpt, parent,
- min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, parent),
+ is_articulation_point[get(index_map, u)] = (children_of_root > 1);
+ } else {
+ put(lowpt, parent,
+ min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, parent),
get(lowpt, u)));
- if ( get(lowpt, u) >= get(dtm, parent) ) {
- if ( get(pred, parent) != parent ) {
- *out++ = parent;
- }
- while ( get(dtm, source(S.top(), g)) >= get(dtm, u) ) {
+ if ( get(lowpt, u) >= get(dtm, parent) ) {
+ is_articulation_point[get(index_map, parent)] = true;
+ while ( get(dtm, source(S.top(), g)) >= get(dtm, u) ) {
+ put(comp, S.top(), c);
+ S.pop();
+ }
+ assert (source(S.top(), g) == parent);
+ assert (target(S.top(), g) == u);
put(comp, S.top(), c);
S.pop();
+ ++c;
}
- assert (source(S.top(), g) == parent);
- assert (target(S.top(), g) == u);
- put(comp, S.top(), c);
- S.pop();
- ++c;
+ }
+ if ( is_articulation_point[get(index_map, u)] ) {
+ *out++ = u;
}
vis.finish_vertex(u, g);
}
ComponentMap comp;
std::size_t& c;
- std::size_t children_of_root;
+ std::size_t& children_of_root;
DiscoverTimeMap dtm;
std::size_t& dfs_time;
LowPointMap lowpt;
PredecessorMap pred;
OutputIterator out;
Stack& S;
+ ArticulationVector& is_articulation_point;
+ IndexMap index_map;
DFSVisitor vis;
};
@@ -168,14 +174,16 @@ namespace boost
vertex_t> ));
std::size_t num_components = 0;
+ std::size_t children_of_root;
std::size_t dfs_time = 0;
- std::stack S;
+ std::stack S;
+ std::vector is_articulation_point(num_vertices(g));
- biconnected_components_visitor,
- DFSVisitor>
- vis(comp, num_components, dtm, dfs_time, lowpt, pred, out,
- S, dfs_vis);
+ biconnected_components_visitor,
+ std::vector, VertexIndexMap, DFSVisitor>
+ vis(comp, num_components, children_of_root, dtm, dfs_time,
+ lowpt, pred, out, S, is_articulation_point, index_map, dfs_vis);
depth_first_search(g, visitor(vis).vertex_index_map(index_map));
diff --git a/include/boost/graph/bron_kerbosch_all_cliques.hpp b/include/boost/graph/bron_kerbosch_all_cliques.hpp
index 1466dfe5..91960936 100644
--- a/include/boost/graph/bron_kerbosch_all_cliques.hpp
+++ b/include/boost/graph/bron_kerbosch_all_cliques.hpp
@@ -224,7 +224,7 @@ namespace detail
// otherwise, iterate over candidates and and test
// for maxmimal cliquiness.
- typename Container::iterator i, j, end = cands.end();
+ typename Container::iterator i, j;
for(i = cands.begin(); i != cands.end(); ) {
Vertex candidate = *i;
diff --git a/include/boost/graph/compressed_sparse_row_graph.hpp b/include/boost/graph/compressed_sparse_row_graph.hpp
index caa27a90..75e61659 100644
--- a/include/boost/graph/compressed_sparse_row_graph.hpp
+++ b/include/boost/graph/compressed_sparse_row_graph.hpp
@@ -1134,7 +1134,6 @@ add_vertices(typename BOOST_DIR_CSR_GRAPH_TYPE::vertices_size_type count, BOOST_
Vertex old_num_verts_plus_one = g.m_forward.m_rowstart.size();
EdgeIndex numedges = g.m_forward.m_rowstart.back();
g.m_forward.m_rowstart.resize(old_num_verts_plus_one + count, numedges);
- g.m_backward.m_rowstart.resize(old_num_verts_plus_one + count, numedges);
g.vertex_properties().resize(num_vertices(g));
return old_num_verts_plus_one - 1;
}
diff --git a/include/boost/graph/graphml.hpp b/include/boost/graph/graphml.hpp
index 2239d966..028cdc26 100644
--- a/include/boost/graph/graphml.hpp
+++ b/include/boost/graph/graphml.hpp
@@ -262,7 +262,7 @@ write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index,
for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i)
{
std::string key_id = "key" + lexical_cast(key_count++);
- if (i->second->key() == typeid(Graph))
+ if (i->second->key() == typeid(Graph*))
graph_key_ids[i->first] = key_id;
else if (i->second->key() == typeid(vertex_descriptor))
vertex_key_ids[i->first] = key_id;
@@ -273,7 +273,7 @@ write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index,
std::string type_name = "string";
mpl::for_each(get_type_name(i->second->value(), type_names, type_name));
out << " second->key() == typeid(Graph) ? "graph" : (i->second->key() == typeid(vertex_descriptor) ? "node" : "edge")) << "\""
+ << (i->second->key() == typeid(Graph*) ? "graph" : (i->second->key() == typeid(vertex_descriptor) ? "node" : "edge")) << "\""
<< " attr.name=\"" << i->first << "\""
<< " attr.type=\"" << type_name << "\""
<< " />\n";
@@ -287,10 +287,12 @@ write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index,
// Output graph data
for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i)
{
- if (i->second->key() == typeid(Graph))
+ if (i->second->key() == typeid(Graph*))
{
+ // The const_cast here is just to get typeid correct for property
+ // map key; the graph should not be mutated using it.
out << " first] << "\">"
- << encode_char_entities(i->second->get_string(g)) << "\n";
+ << encode_char_entities(i->second->get_string(const_cast(&g))) << "\n";
}
}
diff --git a/include/boost/graph/is_straight_line_drawing.hpp b/include/boost/graph/is_straight_line_drawing.hpp
index 74775b44..161da4d1 100644
--- a/include/boost/graph/is_straight_line_drawing.hpp
+++ b/include/boost/graph/is_straight_line_drawing.hpp
@@ -19,6 +19,7 @@
#include
#include
#include
+#include