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 @@ -34,12 +35,12 @@ namespace boost // defines how far away from the endpoints of s1 and s2 we want to consider // an intersection. - bool intersects(double x1, double y1, - double x2, double y2, - double a1, double b1, - double a2, double b2, - double epsilon = 0.000001 - ) + inline bool intersects(double x1, double y1, + double x2, double y2, + double a1, double b1, + double a2, double b2, + double epsilon = 0.000001 + ) { if (x1 - x2 == 0) diff --git a/include/boost/graph/isomorphism.hpp b/include/boost/graph/isomorphism.hpp index bbdd1f7b..f8e44867 100644 --- a/include/boost/graph/isomorphism.hpp +++ b/include/boost/graph/isomorphism.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -195,69 +196,123 @@ namespace boost { } private: + struct match_continuation { + enum {pos_G2_vertex_loop, pos_fi_adj_loop, pos_dfs_num} position; + typedef typename graph_traits::vertex_iterator vertex_iterator; + std::pair G2_verts; + typedef typename graph_traits::adjacency_iterator adjacency_iterator; + std::pair fi_adj; + edge_iter iter; + int dfs_num_k; + }; + bool match(edge_iter iter, int dfs_num_k) { + std::vector k; + typedef typename graph_traits::vertex_iterator vertex_iterator; + std::pair G2_verts(vertices(G2)); + typedef typename graph_traits::adjacency_iterator adjacency_iterator; + std::pair fi_adj; + vertex1_t i, j; + + recur: if (iter != ordered_edges.end()) { - vertex1_t i = source(*iter, G1), j = target(*iter, G2); + i = source(*iter, G1); + j = target(*iter, G2); if (dfs_num[i] > dfs_num_k) { - vertex1_t kp1 = dfs_vertices[dfs_num_k + 1]; - BGL_FORALL_VERTICES_T(u, G2, Graph2) { - if (invariant1(kp1) == invariant2(u) && in_S[u] == false) { - f[kp1] = u; - in_S[u] = true; - num_edges_on_k = 0; - - if (match(iter, dfs_num_k + 1)) -#if 0 - // dwa 2003/7/11 -- this *HAS* to be a bug! - ; -#endif - return true; + G2_verts = vertices(G2); + while (G2_verts.first != G2_verts.second) { + { + vertex2_t u = *G2_verts.first; + vertex1_t kp1 = dfs_vertices[dfs_num_k + 1]; + if (invariant1(kp1) == invariant2(u) && in_S[u] == false) { + { + f[kp1] = u; + in_S[u] = true; + num_edges_on_k = 0; - in_S[u] = false; + match_continuation new_k; + new_k.position = match_continuation::pos_G2_vertex_loop; + new_k.G2_verts = G2_verts; + new_k.iter = iter; + new_k.dfs_num_k = dfs_num_k; + k.push_back(new_k); + ++dfs_num_k; + goto recur; + } + } } +G2_loop_k: ++G2_verts.first; } } else if (dfs_num[j] > dfs_num_k) { - vertex1_t k = dfs_vertices[dfs_num_k]; - num_edges_on_k -= - count_if(adjacent_vertices(f[k], G2), make_indirect_pmap(in_S)); - - for (int jj = 0; jj < dfs_num_k; ++jj) { - vertex1_t j = dfs_vertices[jj]; - num_edges_on_k -= count(adjacent_vertices(f[j], G2), f[k]); + { + vertex1_t vk = dfs_vertices[dfs_num_k]; + num_edges_on_k -= + count_if(adjacent_vertices(f[vk], G2), make_indirect_pmap(in_S)); + + for (int jj = 0; jj < dfs_num_k; ++jj) { + vertex1_t j = dfs_vertices[jj]; + num_edges_on_k -= count(adjacent_vertices(f[j], G2), f[vk]); + } } if (num_edges_on_k != 0) - return false; - BGL_FORALL_ADJ_T(f[i], v, G2, Graph2) - if (invariant2(v) == invariant1(j) && in_S[v] == false) { - f[j] = v; - in_S[v] = true; - num_edges_on_k = 1; - BOOST_USING_STD_MAX(); - int next_k = max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num_k, max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num[i], dfs_num[j])); - if (match(boost::next(iter), next_k)) - return true; - in_S[v] = false; + goto return_point_false; + fi_adj = adjacent_vertices(f[i], G2); + while (fi_adj.first != fi_adj.second) { + { + vertex2_t v = *fi_adj.first; + if (invariant2(v) == invariant1(j) && in_S[v] == false) { + f[j] = v; + in_S[v] = true; + num_edges_on_k = 1; + BOOST_USING_STD_MAX(); + int next_k = max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num_k, max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num[i], dfs_num[j])); + match_continuation new_k; + new_k.position = match_continuation::pos_fi_adj_loop; + new_k.fi_adj = fi_adj; + new_k.iter = iter; + new_k.dfs_num_k = dfs_num_k; + ++iter; + dfs_num_k = next_k; + k.push_back(new_k); + goto recur; + } } - - +fi_adj_loop_k:++fi_adj.first; + } } else { if (container_contains(adjacent_vertices(f[i], G2), f[j])) { ++num_edges_on_k; - if (match(boost::next(iter), dfs_num_k)) - return true; + match_continuation new_k; + new_k.position = match_continuation::pos_dfs_num; + k.push_back(new_k); + ++iter; + goto recur; } } } else - return true; - return false; - } + goto return_point_true; + goto return_point_false; + { + return_point_true: return true; + + return_point_false: + if (k.empty()) return false; + const match_continuation& this_k = k.back(); + switch (this_k.position) { + case match_continuation::pos_G2_vertex_loop: {G2_verts = this_k.G2_verts; iter = this_k.iter; dfs_num_k = this_k.dfs_num_k; k.pop_back(); in_S[*G2_verts.first] = false; i = source(*iter, G1); j = target(*iter, G2); goto G2_loop_k;} + case match_continuation::pos_fi_adj_loop: {fi_adj = this_k.fi_adj; iter = this_k.iter; dfs_num_k = this_k.dfs_num_k; k.pop_back(); in_S[*fi_adj.first] = false; i = source(*iter, G1); j = target(*iter, G2); goto fi_adj_loop_k;} + case match_continuation::pos_dfs_num: {k.pop_back(); goto return_point_false;} + default: assert (!"Bad position"); abort(); + } + } + } }; diff --git a/include/boost/graph/johnson_all_pairs_shortest.hpp b/include/boost/graph/johnson_all_pairs_shortest.hpp index 32e2b5cd..b8da0fe1 100644 --- a/include/boost/graph/johnson_all_pairs_shortest.hpp +++ b/include/boost/graph/johnson_all_pairs_shortest.hpp @@ -121,8 +121,6 @@ namespace boost { (g2, *u, pred, d, w_hat, id2, compare, combine, inf, zero,dvis); for (boost::tie(v, v_end) = vertices(g2); v != v_end; ++v) { if (*u != s && *v != s) { - typename Traits1::vertex_descriptor u1, v1; - u1 = verts1[get(id2, *u)]; v1 = verts1[get(id2, *v)]; D[get(id2, *u)-1][get(id2, *v)-1] = combine(get(d, *v), (get(h, *v) - get(h, *u))); } } diff --git a/include/boost/graph/property_maps/null_property_map.hpp b/include/boost/graph/property_maps/null_property_map.hpp index f6273481..09ff55e3 100644 --- a/include/boost/graph/property_maps/null_property_map.hpp +++ b/include/boost/graph/property_maps/null_property_map.hpp @@ -29,7 +29,7 @@ namespace boost // The null_property_map only has a put() function. template - void put(null_property_map& pm, const K& key, const V& value) + void put(null_property_map& /*pm*/, const K& /*key*/, const V& /*value*/) { } // A helper function for intantiating null property maps. diff --git a/include/boost/graph/subgraph.hpp b/include/boost/graph/subgraph.hpp index b98c3902..1860c8ce 100644 --- a/include/boost/graph/subgraph.hpp +++ b/include/boost/graph/subgraph.hpp @@ -131,15 +131,29 @@ public: // copy constructor subgraph(const subgraph& x) - : m_graph(x.m_graph), m_parent(x.m_parent), m_edge_counter(x.m_edge_counter) + : m_parent(x.m_parent), m_edge_counter(x.m_edge_counter) , m_global_vertex(x.m_global_vertex), m_global_edge(x.m_global_edge) { - // Do a deep copy (recursive). - for(typename ChildrenList::const_iterator i = x.m_children.begin(); - i != x.m_children.end(); ++i) + if(x.is_root()) { - m_children.push_back(new subgraph( **i )); + m_graph = x.m_graph; } + // Do a deep copy (recursive). + // Only the root graph is copied, the subgraphs contain + // only references to the global vertices they own. + typename subgraph::children_iterator i,i_end; + boost::tie(i,i_end) = x.children(); + for(; i != i_end; ++i) + { + subgraph child = this->create_subgraph(); + child = *i; + vertex_iterator vi,vi_end; + boost::tie(vi,vi_end) = vertices(*i); + for (;vi!=vi_end;++vi) + { + add_vertex(*vi,child); + } + } } diff --git a/include/boost/graph/vector_as_graph.hpp b/include/boost/graph/vector_as_graph.hpp index ee0df4bc..c1799993 100644 --- a/include/boost/graph/vector_as_graph.hpp +++ b/include/boost/graph/vector_as_graph.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,7 @@ namespace boost { out_edge_iterator; typedef void in_edge_iterator; typedef void edge_iterator; - typedef typename integer_range::iterator vertex_iterator; + typedef counting_iterator vertex_iterator; typedef directed_tag directed_category; typedef allow_parallel_edge_tag edge_parallel_category; typedef vector_as_graph_traversal_tag traversal_category; @@ -178,14 +179,11 @@ namespace boost { // source() and target() already provided for pairs in graph_traits.hpp template - std::pair - ::iterator, - typename boost::integer_range - ::iterator > + std::pair, + boost::counting_iterator > vertices(const std::vector& v) { - typedef typename boost::integer_range - ::iterator Iter; + typedef boost::counting_iterator Iter; return std::make_pair(Iter(0), Iter(v.size())); } diff --git a/test/adj_list_cc.cpp b/test/adj_list_cc.cpp index fad29388..b1e2d544 100644 --- a/test/adj_list_cc.cpp +++ b/test/adj_list_cc.cpp @@ -75,8 +75,6 @@ int main(int,char*[]) BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept )); BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept )); - BOOST_CONCEPT_ASSERT(( - ReadablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( LvaluePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( @@ -97,8 +95,6 @@ int main(int,char*[]) BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept )); BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept )); - BOOST_CONCEPT_ASSERT(( - ReadablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( LvaluePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( @@ -143,8 +139,6 @@ int main(int,char*[]) BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept )); BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept )); - BOOST_CONCEPT_ASSERT(( - ReadablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( LvaluePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( @@ -165,8 +159,6 @@ int main(int,char*[]) BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept )); BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept )); - BOOST_CONCEPT_ASSERT(( - ReadablePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( LvaluePropertyGraphConcept )); BOOST_CONCEPT_ASSERT(( diff --git a/test/core_numbers_test.cpp b/test/core_numbers_test.cpp index 733bf4a6..3af08116 100644 --- a/test/core_numbers_test.cpp +++ b/test/core_numbers_test.cpp @@ -78,7 +78,6 @@ int test_2() { int num_arcs = sizeof(edge_array) / sizeof(Edge); graph_t G(edge_array, edge_array + num_arcs, weights, num_nodes); - property_map::type weightmap = get(edge_weight, G); std::vector core_nums(num_vertices(G)); weighted_core_numbers(G, diff --git a/test/csr_graph_test.cpp b/test/csr_graph_test.cpp index 757a8841..b6a99603 100644 --- a/test/csr_graph_test.cpp +++ b/test/csr_graph_test.cpp @@ -280,14 +280,13 @@ void graph_test(const OrigGraph& g) // Check edge_from_index (and implicitly the edge_index property map) for // each edge in g2 - std::size_t last_src = 0, last_tgt = 0; + std::size_t last_src = 0; for (boost::tie(ei, ei_end) = edges(g2); ei != ei_end; ++ei) { BOOST_CHECK(edge_from_index(get(boost::edge_index, g2, *ei), g2) == *ei); std::size_t src = get(boost::vertex_index, g2, source(*ei, g2)); - std::size_t tgt = get(boost::vertex_index, g2, target(*ei, g2)); + (void)(std::size_t)get(boost::vertex_index, g2, target(*ei, g2)); BOOST_CHECK(src >= last_src); last_src = src; - last_tgt = tgt; } // Check out edge iteration and vertex iteration for sortedness diff --git a/test/dag_longest_paths.cpp b/test/dag_longest_paths.cpp index a3793082..4b5151b3 100644 --- a/test/dag_longest_paths.cpp +++ b/test/dag_longest_paths.cpp @@ -20,12 +20,11 @@ int test_main(int, char*[]) property > Graph; Graph graph; - Graph::vertex_descriptor v1, v2, v3, v4; - v1 = add_vertex(graph); - v2 = add_vertex(graph); - v3 = add_vertex(graph); - v4 = add_vertex(graph); + (void)add_vertex(graph); + (void)add_vertex(graph); + (void)add_vertex(graph); + (void)add_vertex(graph); Graph::edge_descriptor e; diff --git a/test/dijkstra_no_color_map_compare.cpp b/test/dijkstra_no_color_map_compare.cpp index a8c140d1..5ff18c1c 100644 --- a/test/dijkstra_no_color_map_compare.cpp +++ b/test/dijkstra_no_color_map_compare.cpp @@ -109,8 +109,6 @@ int test_main(int argc, char* argv[]) put(index_map, current_vertex, vertex_index++); } - typedef property_map::type weight_map_t; - weight_map_t weight_map = get(edge_weight, graph); randomize_property(graph, generator); // Run comparison test with original dijkstra_shortest_paths diff --git a/test/index_graph.cpp b/test/index_graph.cpp index b988179f..3e757e82 100644 --- a/test/index_graph.cpp +++ b/test/index_graph.cpp @@ -20,7 +20,7 @@ void test() static const size_t N = 5; Graph g; - IndexMap x = get(vertex_index, g); + (void)(IndexMap)get(vertex_index, g); // build up the graph Vertex v[N]; @@ -73,7 +73,7 @@ void build() Graph g(N); BOOST_ASSERT(max_vertex_index(g) == N); - IndexMap x = get(vertex_index, g); + (void)(IndexMap)get(vertex_index, g); // Each vertex should be numbered correctly. Iterator i, end; diff --git a/test/property_iter.cpp b/test/property_iter.cpp index 150061e9..d206d2a7 100644 --- a/test/property_iter.cpp +++ b/test/property_iter.cpp @@ -68,8 +68,10 @@ int main(int, char* []) std::size_t current_edge_id = 0; property_map::type vertex_id_map = get(vertex_id, g); + (void)vertex_id_map; property_map::type edge_id_map = get(edge_id, g); + (void)edge_id_map; for (std::size_t k = 0; k < N; ++k) add_vertex(current_vertex_id++, g); diff --git a/test/subgraph_bundled.cpp b/test/subgraph_bundled.cpp index 81629c95..ccfcb42b 100644 --- a/test/subgraph_bundled.cpp +++ b/test/subgraph_bundled.cpp @@ -127,7 +127,7 @@ int test_main(int, char*[]) graph_traits::edge_iterator ei, ee; for (boost::tie(ei, ee) = edges(sub); ei != ee; ++ei) { // This used to segfault. - get(edge_weight, sub, *ei); + get(&arc::weight, sub, *ei); } }