|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75431 - in trunk: boost/graph boost/graph/detail libs/graph/example libs/graph/test
From: jewillco_at_[hidden]
Date: 2011-11-10 10:04:33
Author: jewillco
Date: 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
New Revision: 75431
URL: http://svn.boost.org/trac/boost/changeset/75431
Log:
Qualified more calls to tie; fixes #6112
Text files modified:
trunk/boost/graph/chrobak_payne_drawing.hpp | 2
trunk/boost/graph/closeness_centrality.hpp | 2
trunk/boost/graph/degree_centrality.hpp | 2
trunk/boost/graph/detail/geodesic.hpp | 2
trunk/boost/graph/geodesic_distance.hpp | 2
trunk/boost/graph/is_kuratowski_subgraph.hpp | 10 +++---
trunk/boost/graph/is_straight_line_drawing.hpp | 2
trunk/boost/graph/make_maximal_planar.hpp | 4 +-
trunk/boost/graph/planar_canonical_ordering.hpp | 2
trunk/boost/graph/planar_face_traversal.hpp | 4 +-
trunk/boost/graph/push_relabel_max_flow.hpp | 4 +-
trunk/boost/graph/tiernan_all_cycles.hpp | 6 ++--
trunk/boost/graph/write_dimacs.hpp | 2
trunk/libs/graph/example/canonical_ordering.cpp | 2
trunk/libs/graph/example/closeness_centrality.cpp | 2
trunk/libs/graph/example/clustering_coefficient.cpp | 2
trunk/libs/graph/example/degree_centrality.cpp | 2
trunk/libs/graph/example/implicit_graph.cpp | 10 +++---
trunk/libs/graph/example/inclusive_mean_geodesic.cpp | 2
trunk/libs/graph/example/influence_prestige.cpp | 2
trunk/libs/graph/example/kuratowski_subgraph.cpp | 2
trunk/libs/graph/example/make_biconnected_planar.cpp | 4 +-
trunk/libs/graph/example/make_maximal_planar.cpp | 6 ++--
trunk/libs/graph/example/matching_example.cpp | 4 +-
trunk/libs/graph/example/mean_geodesic.cpp | 2
trunk/libs/graph/example/planar_face_traversal.cpp | 2
trunk/libs/graph/example/scaled_closeness_centrality.cpp | 2
trunk/libs/graph/example/straight_line_drawing.cpp | 2
trunk/libs/graph/test/all_planar_input_files_test.cpp | 4 +-
trunk/libs/graph/test/basic_planarity_test.cpp | 2
trunk/libs/graph/test/bellman-test.cpp | 2
trunk/libs/graph/test/isomorphism.cpp | 57 ++++++++++++++++++++++++++++++++++++++++
trunk/libs/graph/test/labeled_graph.cpp | 2
trunk/libs/graph/test/make_bicon_planar_test.cpp | 6 ++--
trunk/libs/graph/test/make_connected_test.cpp | 4 +-
trunk/libs/graph/test/make_maximal_planar_test.cpp | 6 ++--
trunk/libs/graph/test/parallel_edges_loops_test.cpp | 6 ++--
trunk/libs/graph/test/test_construction.hpp | 2
trunk/libs/graph/test/transitive_closure_test2.cpp | 2
39 files changed, 120 insertions(+), 63 deletions(-)
Modified: trunk/boost/graph/chrobak_payne_drawing.hpp
==============================================================================
--- trunk/boost/graph/chrobak_payne_drawing.hpp (original)
+++ trunk/boost/graph/chrobak_payne_drawing.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -240,7 +240,7 @@
(*ordering_begin,0,g,x,delta_x,left,right);
vertex_iterator_t vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
vertex_t v(*vi);
drawing[v].x = x[v];
Modified: trunk/boost/graph/closeness_centrality.hpp
==============================================================================
--- trunk/boost/graph/closeness_centrality.hpp (original)
+++ trunk/boost/graph/closeness_centrality.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -126,7 +126,7 @@
typedef typename property_traits<CentralityMap>::value_type Centrality;
typename graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
DistanceMap dm = get(dist, *i);
Centrality c = closeness_centrality(g, dm, measure);
put(cent, *i, c);
Modified: trunk/boost/graph/degree_centrality.hpp
==============================================================================
--- trunk/boost/graph/degree_centrality.hpp (original)
+++ trunk/boost/graph/degree_centrality.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -101,7 +101,7 @@
typedef typename property_traits<CentralityMap>::value_type Centrality;
VertexIterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
Centrality c = degree_centrality(g, *i, measure);
put(cent, *i, c);
}
Modified: trunk/boost/graph/detail/geodesic.hpp
==============================================================================
--- trunk/boost/graph/detail/geodesic.hpp (original)
+++ trunk/boost/graph/detail/geodesic.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -65,7 +65,7 @@
// zero, so it shouldn't be too problematic.
Distance ret = init;
VertexIterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
Vertex v = *i;
if(get(dist, v) != DistanceNumbers::infinity()) {
ret = combine(ret, get(dist, v));
Modified: trunk/boost/graph/geodesic_distance.hpp
==============================================================================
--- trunk/boost/graph/geodesic_distance.hpp (original)
+++ trunk/boost/graph/geodesic_distance.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -156,7 +156,7 @@
Result inf = numeric_values<Result>::infinity();
Result sum = numeric_values<Result>::zero();
VertexIterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
DistanceMap dm = get(dist, *i);
Result r = mean_geodesic(g, dm, measure);
put(geo, *i, r);
Modified: trunk/boost/graph/is_kuratowski_subgraph.hpp
==============================================================================
--- trunk/boost/graph/is_kuratowski_subgraph.hpp (original)
+++ trunk/boost/graph/is_kuratowski_subgraph.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -33,7 +33,7 @@
{
typename graph_traits<Graph>::vertex_iterator vi, vi_end, inner_vi;
Graph K_5(5);
- for(tie(vi,vi_end) = vertices(K_5); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(K_5); vi != vi_end; ++vi)
for(inner_vi = next(vi); inner_vi != vi_end; ++inner_vi)
add_edge(*vi, *inner_vi, K_5);
return K_5;
@@ -47,7 +47,7 @@
vi, vi_end, bipartition_start, inner_vi;
Graph K_3_3(6);
bipartition_start = next(next(next(vertices(K_3_3).first)));
- for(tie(vi, vi_end) = vertices(K_3_3); vi != bipartition_start; ++vi)
+ for(boost::tie(vi, vi_end) = vertices(K_3_3); vi != bipartition_start; ++vi)
for(inner_vi= bipartition_start; inner_vi != vi_end; ++inner_vi)
add_edge(*vi, *inner_vi, K_3_3);
return K_3_3;
@@ -158,7 +158,7 @@
{
vertex_iterator_t vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
vertex_t v(*vi);
@@ -242,7 +242,7 @@
if (max_size == 3)
{
// check to see whether we should go on to find a K_5
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
if (neighbors[*vi].size() == 4)
{
target_graph = detail::tg_k_5;
@@ -261,7 +261,7 @@
v_list_t main_vertices;
vertex_iterator_t vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
if (!neighbors[*vi].empty())
main_vertices.push_back(*vi);
Modified: trunk/boost/graph/is_straight_line_drawing.hpp
==============================================================================
--- trunk/boost/graph/is_straight_line_drawing.hpp (original)
+++ trunk/boost/graph/is_straight_line_drawing.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -126,7 +126,7 @@
active_map_t active_edges;
edge_iterator_t ei, ei_end;
- for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
{
edge_t e(*ei);
vertex_t s(source(e,g));
Modified: trunk/boost/graph/make_maximal_planar.hpp
==============================================================================
--- trunk/boost/graph/make_maximal_planar.hpp (original)
+++ trunk/boost/graph/make_maximal_planar.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -62,7 +62,7 @@
degree(degree_vector.begin(), vm)
{
vertex_iterator_t vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
put(degree, *vi, out_degree(*vi, g));
}
@@ -117,7 +117,7 @@
// Mark all of the min degree vertex's neighbors
adjacency_iterator_t ai, ai_end;
- for(tie(ai,ai_end) = adjacent_vertices(vertices_on_face.front(),g);
+ for(boost::tie(ai,ai_end) = adjacent_vertices(vertices_on_face.front(),g);
ai != ai_end; ++ai
)
{
Modified: trunk/boost/graph/planar_canonical_ordering.hpp
==============================================================================
--- trunk/boost/graph/planar_canonical_ordering.hpp (original)
+++ trunk/boost/graph/planar_canonical_ordering.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -67,7 +67,7 @@
vertex_t first_vertex = *vertices(g).first;
vertex_t second_vertex;
adjacency_iterator_t ai, ai_end;
- for(tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai)
+ for(boost::tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai)
{
if (*ai == first_vertex)
continue;
Modified: trunk/boost/graph/planar_face_traversal.hpp
==============================================================================
--- trunk/boost/graph/planar_face_traversal.hpp (original)
+++ trunk/boost/graph/planar_face_traversal.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -98,7 +98,7 @@
// PlanarEmbedding so that get(next_edge, e)[v] is the edge that comes
// after e in the clockwise embedding around vertex v.
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
vertex_t v(*vi);
pi_begin = embedding[v].begin();
@@ -122,7 +122,7 @@
std::vector<edge_t> edges_cache;
std::vector<vertex_t> vertices_in_edge;
- for(tie(fi,fi_end) = edges(g); fi != fi_end; ++fi)
+ for(boost::tie(fi,fi_end) = edges(g); fi != fi_end; ++fi)
{
edge_t e(*fi);
edges_cache.push_back(e);
Modified: trunk/boost/graph/push_relabel_max_flow.hpp
==============================================================================
--- trunk/boost/graph/push_relabel_max_flow.hpp (original)
+++ trunk/boost/graph/push_relabel_max_flow.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -550,8 +550,8 @@
}
// do the bottom
u = bos;
- ai = out_edges(u, g).first;
- while (get(excess_flow, u) > 0) {
+ boost::tie(ai, a_end) = out_edges(u, g);
+ while (get(excess_flow, u) > 0 && ai != a_end) {
if (get(capacity, *ai) == 0 && is_residual_edge(*ai))
push_flow(*ai);
++ai;
Modified: trunk/boost/graph/tiernan_all_cycles.hpp
==============================================================================
--- trunk/boost/graph/tiernan_all_cycles.hpp (original)
+++ trunk/boost/graph/tiernan_all_cycles.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -193,7 +193,7 @@
u = p.back(),
v = p.front();
OutIterator i, end;
- for(tie(i, end) = out_edges(u, g); i != end; ++i) {
+ for(boost::tie(i, end) = out_edges(u, g); i != end; ++i) {
if((target(*i, g) == v)) {
return true;
}
@@ -220,7 +220,7 @@
// AdjacencyIterator i, end;
OutIterator i, end;
- for(tie(i, end) = out_edges(u, g); i != end; ++i) {
+ for(boost::tie(i, end) = out_edges(u, g); i != end; ++i) {
Vertex v = target(*i, g);
// if we can actually extend along this edge,
@@ -324,7 +324,7 @@
typedef typename graph_traits<Graph>::vertex_iterator VertexIterator;
VertexIterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
detail::all_cycles_from_vertex(g, *i, vis, minlen, maxlen);
}
}
Modified: trunk/boost/graph/write_dimacs.hpp
==============================================================================
--- trunk/boost/graph/write_dimacs.hpp (original)
+++ trunk/boost/graph/write_dimacs.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -64,7 +64,7 @@
//output the edges
edge_iterator ei, e_end;
- for(tie(ei,e_end) = edges(g); ei!=e_end; ++ei){
+ for(boost::tie(ei,e_end) = edges(g); ei!=e_end; ++ei){
out << "a " << idx[ source(*ei, g) ] + 1 << " " << idx[ target(*ei, g) ] + 1 << " " << get(capacity,*ei) << std::endl;
}
}
Modified: trunk/libs/graph/example/canonical_ordering.cpp
==============================================================================
--- trunk/libs/graph/example/canonical_ordering.cpp (original)
+++ trunk/libs/graph/example/canonical_ordering.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -54,7 +54,7 @@
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
graph_traits<graph>::edges_size_type edge_count = 0;
graph_traits<graph>::edge_iterator ei, ei_end;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
Modified: trunk/libs/graph/example/closeness_centrality.cpp
==============================================================================
--- trunk/libs/graph/example/closeness_centrality.cpp (original)
+++ trunk/libs/graph/example/closeness_centrality.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -75,7 +75,7 @@
// Print the closeness centrality of each vertex.
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setw(12) << setiosflags(ios::left)
<< g[*i].name << get(cm, *i) << endl;
}
Modified: trunk/libs/graph/example/clustering_coefficient.cpp
==============================================================================
--- trunk/libs/graph/example/clustering_coefficient.cpp (original)
+++ trunk/libs/graph/example/clustering_coefficient.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -58,7 +58,7 @@
// Print the clustering coefficient of each vertex.
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setw(12) << setiosflags(ios::left)
<< g[*i].name << get(cm, *i) << endl;
}
Modified: trunk/libs/graph/example/degree_centrality.cpp
==============================================================================
--- trunk/libs/graph/example/degree_centrality.cpp (original)
+++ trunk/libs/graph/example/degree_centrality.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -57,7 +57,7 @@
// Print the degree centrality of each vertex.
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setiosflags(ios::left) << setw(12)
<< g[*i].name << cm[*i] << endl;
}
Modified: trunk/libs/graph/example/implicit_graph.cpp
==============================================================================
--- trunk/libs/graph/example/implicit_graph.cpp (original)
+++ trunk/libs/graph/example/implicit_graph.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -473,18 +473,18 @@
// 5 vertices
std::cout << "Vertices, outgoing edges, and adjacent vertices" << std::endl;
vertex_iterator vi, vi_end;
- for (tie(vi, vi_end) = vertices(g); vi != vi_end; vi++) {
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; vi++) {
vertex_descriptor u = *vi;
std::cout << "Vertex " << u << ": ";
// Adjacenct edges
out_edge_iterator ei, ei_end;
- for (tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ei++)
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ei++)
std::cout << *ei << " ";
std::cout << " Adjacent vertices ";
// Adjacent vertices
// Here we want our adjacency_iterator and not boost::adjacency_iterator.
::adjacency_iterator ai, ai_end;
- for (tie(ai, ai_end) = adjacent_vertices(u, g); ai != ai_end; ai++) {
+ for (boost::tie(ai, ai_end) = adjacent_vertices(u, g); ai != ai_end; ai++) {
std::cout << *ai << " ";
}
std::cout << std::endl;
@@ -503,7 +503,7 @@
// 5 edges
std::cout << "Edges and weights" << std::endl;
edge_iterator ei, ei_end;
- for (tie(ei, ei_end) = edges(g); ei != ei_end; ei++) {
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ei++) {
edge_descriptor e = *ei;
std::cout << e << " weight " << get(edge_weight, g, e) << std::endl;
}
@@ -528,7 +528,7 @@
distance_map(&dist[0]) );
std::cout << "Dijkstra search from vertex " << source << std::endl;
- for (tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) {
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) {
vertex_descriptor u = *vi;
std::cout << "Vertex " << u << ": "
<< "parent "<< pred[*vi] << ", "
Modified: trunk/libs/graph/example/inclusive_mean_geodesic.cpp
==============================================================================
--- trunk/libs/graph/example/inclusive_mean_geodesic.cpp (original)
+++ trunk/libs/graph/example/inclusive_mean_geodesic.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -121,7 +121,7 @@
cout << setw(12) << setiosflags(ios::left) << "excluding";
cout << setw(12) << setiosflags(ios::left) << "including" << endl;
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setw(12) << setiosflags(ios::left)
<< g[*i].name
<< setw(12) << get(exmap, *i)
Modified: trunk/libs/graph/example/influence_prestige.cpp
==============================================================================
--- trunk/libs/graph/example/influence_prestige.cpp (original)
+++ trunk/libs/graph/example/influence_prestige.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -62,7 +62,7 @@
// Print the degree centrality of each vertex
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
Vertex v = *i;
cout << setiosflags(ios::left) << setw(12)
<< g[v].name << "\t"
Modified: trunk/libs/graph/example/kuratowski_subgraph.cpp
==============================================================================
--- trunk/libs/graph/example/kuratowski_subgraph.cpp (original)
+++ trunk/libs/graph/example/kuratowski_subgraph.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -55,7 +55,7 @@
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
graph_traits<graph>::edges_size_type edge_count = 0;
graph_traits<graph>::edge_iterator ei, ei_end;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
Modified: trunk/libs/graph/example/make_biconnected_planar.cpp
==============================================================================
--- trunk/libs/graph/example/make_biconnected_planar.cpp (original)
+++ trunk/libs/graph/example/make_biconnected_planar.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -51,7 +51,7 @@
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
graph_traits<graph>::edges_size_type edge_count = 0;
graph_traits<graph>::edge_iterator ei, ei_end;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
@@ -86,7 +86,7 @@
// Re-initialize the edge index, since we just added a few edges
edge_count = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
// Re-size the storage for the biconnected components, since we
Modified: trunk/libs/graph/example/make_maximal_planar.cpp
==============================================================================
--- trunk/libs/graph/example/make_maximal_planar.cpp (original)
+++ trunk/libs/graph/example/make_maximal_planar.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -74,7 +74,7 @@
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
graph_traits<graph>::edges_size_type edge_count = 0;
graph_traits<graph>::edge_iterator ei, ei_end;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
@@ -94,7 +94,7 @@
// Re-initialize the edge index, since we just added a few edges
edge_count = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
@@ -116,7 +116,7 @@
// Re-initialize the edge index, since we just added a few edges
edge_count = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
// Test for planarity one final time; compute the planar embedding as a
Modified: trunk/libs/graph/example/matching_example.cpp
==============================================================================
--- trunk/libs/graph/example/matching_example.cpp (original)
+++ trunk/libs/graph/example/matching_example.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -83,7 +83,7 @@
std::cout << "The matching is:" << std::endl;
graph_traits<my_graph>::vertex_iterator vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
if (mate[*vi] != graph_traits<my_graph>::null_vertex() && *vi < mate[*vi])
std::cout << "{" << *vi << ", " << mate[*vi] << "}" << std::endl;
@@ -109,7 +109,7 @@
std::cout << "The matching is:" << std::endl;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
if (mate[*vi] != graph_traits<my_graph>::null_vertex() && *vi < mate[*vi])
std::cout << "{" << *vi << ", " << mate[*vi] << "}" << std::endl;
Modified: trunk/libs/graph/example/mean_geodesic.cpp
==============================================================================
--- trunk/libs/graph/example/mean_geodesic.cpp (original)
+++ trunk/libs/graph/example/mean_geodesic.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -77,7 +77,7 @@
// Print the mean geodesic distance of each vertex and finally,
// the graph itself.
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setw(12) << setiosflags(ios::left)
<< g[*i].name << get(gm, *i) << endl;
}
Modified: trunk/libs/graph/example/planar_face_traversal.cpp
==============================================================================
--- trunk/libs/graph/example/planar_face_traversal.cpp (original)
+++ trunk/libs/graph/example/planar_face_traversal.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -94,7 +94,7 @@
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
graph_traits<graph>::edges_size_type edge_count = 0;
graph_traits<graph>::edge_iterator ei, ei_end;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
Modified: trunk/libs/graph/example/scaled_closeness_centrality.cpp
==============================================================================
--- trunk/libs/graph/example/scaled_closeness_centrality.cpp (original)
+++ trunk/libs/graph/example/scaled_closeness_centrality.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -104,7 +104,7 @@
// Print the scaled closeness centrality of each vertex.
graph_traits<Graph>::vertex_iterator i, end;
- for(tie(i, end) = vertices(g); i != end; ++i) {
+ for(boost::tie(i, end) = vertices(g); i != end; ++i) {
cout << setw(12) << setiosflags(ios::left)
<< g[*i].name << get(cm, *i) << endl;
}
Modified: trunk/libs/graph/example/straight_line_drawing.cpp
==============================================================================
--- trunk/libs/graph/example/straight_line_drawing.cpp (original)
+++ trunk/libs/graph/example/straight_line_drawing.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -122,7 +122,7 @@
std::cout << "The straight line drawing is: " << std::endl;
graph_traits<graph>::vertex_iterator vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
coord_t coord(get(straight_line_drawing,*vi));
std::cout << *vi << " -> (" << coord.x << ", " << coord.y << ")"
Modified: trunk/libs/graph/test/all_planar_input_files_test.cpp
==============================================================================
--- trunk/libs/graph/test/all_planar_input_files_test.cpp (original)
+++ trunk/libs/graph/test/all_planar_input_files_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -137,7 +137,7 @@
// Initialize the interior edge index
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
e_size_t edge_count = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
// Initialize the interior vertex index - not needed if the vertices
@@ -145,7 +145,7 @@
/*
property_map<graph, vertex_index_t>::type v_index = get(vertex_index, g);
v_size_t vertex_count = 0;
- for(tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
put(v_index, *vi, vertex_count++);
*/
Modified: trunk/libs/graph/test/basic_planarity_test.cpp
==============================================================================
--- trunk/libs/graph/test/basic_planarity_test.cpp (original)
+++ trunk/libs/graph/test/basic_planarity_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -25,7 +25,7 @@
typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g);
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
typename graph_traits<Graph>::vertices_size_type cnt = 0;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
put(index, *vi, cnt++);
}
};
Modified: trunk/libs/graph/test/bellman-test.cpp
==============================================================================
--- trunk/libs/graph/test/bellman-test.cpp (original)
+++ trunk/libs/graph/test/bellman-test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -42,7 +42,7 @@
weight_pmap = get(edge_weight, g);
int i = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei, ++i)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei, ++i)
weight_pmap[*ei] = weight[i];
std::vector<int> parent(numVertex);
Modified: trunk/libs/graph/test/isomorphism.cpp
==============================================================================
--- trunk/libs/graph/test/isomorphism.cpp (original)
+++ trunk/libs/graph/test/isomorphism.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -93,6 +93,63 @@
}
}
+void test_isomorphism2()
+{
+ typedef adjacency_list<vecS, vecS, bidirectionalS> graph1;
+ typedef adjacency_list<listS, listS, bidirectionalS,
+ property<vertex_index_t, int> > graph2;
+
+ graph1 g1(2);
+ add_edge(vertex(0, g1), vertex(1, g1), g1);
+ add_edge(vertex(1, g1), vertex(1, g1), g1);
+ graph2 g2;
+ randomly_permute_graph(g1, g2);
+
+ int v_idx = 0;
+ for (graph2::vertex_iterator v = vertices(g2).first;
+ v != vertices(g2).second; ++v) {
+ put(vertex_index_t(), g2, *v, v_idx++);
+ }
+
+ std::map<graph1::vertex_descriptor, graph2::vertex_descriptor> mapping;
+
+ bool isomorphism_correct;
+ clock_t start = clock();
+ BOOST_CHECK(isomorphism_correct = isomorphism
+ (g1, g2, isomorphism_map(make_assoc_property_map(mapping))));
+ clock_t end = clock();
+
+ std::cout << "Elapsed time (clock cycles): " << (end - start) << std::endl;
+
+ bool verify_correct;
+ BOOST_CHECK(verify_correct =
+ verify_isomorphism(g1, g2, make_assoc_property_map(mapping)));
+
+ if (!isomorphism_correct || !verify_correct) {
+ // Output graph 1
+ {
+ std::ofstream out("isomorphism_failure.bg1");
+ out << num_vertices(g1) << std::endl;
+ for (graph1::edge_iterator e = edges(g1).first;
+ e != edges(g1).second; ++e) {
+ out << get(vertex_index_t(), g1, source(*e, g1)) << ' '
+ << get(vertex_index_t(), g1, target(*e, g1)) << std::endl;
+ }
+ }
+
+ // Output graph 2
+ {
+ std::ofstream out("isomorphism_failure.bg2");
+ out << num_vertices(g2) << std::endl;
+ for (graph2::edge_iterator e = edges(g2).first;
+ e != edges(g2).second; ++e) {
+ out << get(vertex_index_t(), g2, source(*e, g2)) << ' '
+ << get(vertex_index_t(), g2, target(*e, g2)) << std::endl;
+ }
+ }
+ }
+}
+
void test_isomorphism(int n, double edge_probability)
{
typedef adjacency_list<vecS, vecS, bidirectionalS> graph1;
Modified: trunk/libs/graph/test/labeled_graph.cpp
==============================================================================
--- trunk/libs/graph/test/labeled_graph.cpp (original)
+++ trunk/libs/graph/test/labeled_graph.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -62,7 +62,7 @@
typedef typename graph_traits<Graph>::vertex_iterator Iter;
Iter f, l;
int x = 0;
- for(tie(f, l) = vertices(g); f != l; ++f, ++x) {
+ for(boost::tie(f, l) = vertices(g); f != l; ++f, ++x) {
label_vertex(*f, x, g);
}
}
Modified: trunk/libs/graph/test/make_bicon_planar_test.cpp
==============================================================================
--- trunk/libs/graph/test/make_bicon_planar_test.cpp (original)
+++ trunk/libs/graph/test/make_bicon_planar_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -25,7 +25,7 @@
typename property_map<Graph, edge_index_t>::type index = get(edge_index, g);
typename graph_traits<Graph>::edge_iterator ei, ei_end;
typename graph_traits<Graph>::edges_size_type cnt = 0;
- for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
put(index, *ei, cnt++);
}
@@ -54,7 +54,7 @@
typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g);
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
typename graph_traits<Graph>::vertices_size_type cnt = 0;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
put(index, *vi, cnt++);
}
};
@@ -87,7 +87,7 @@
embedding_t embedding(embedding_storage.begin(), get(vertex_index, g));
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
std::copy(out_edges(*vi,g).first, out_edges(*vi,g).second, std::back_inserter(embedding[*vi]));
BOOST_CHECK(biconnected_components(g, make_vector_property_map<int>(get(edge_index,g))) > 1);
Modified: trunk/libs/graph/test/make_connected_test.cpp
==============================================================================
--- trunk/libs/graph/test/make_connected_test.cpp (original)
+++ trunk/libs/graph/test/make_connected_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -24,7 +24,7 @@
typename property_map<Graph, edge_index_t>::type index = get(edge_index, g);
typename graph_traits<Graph>::edge_iterator ei, ei_end;
typename graph_traits<Graph>::edges_size_type cnt = 0;
- for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
put(index, *ei, cnt++);
}
@@ -36,7 +36,7 @@
typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g);
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
typename graph_traits<Graph>::vertices_size_type cnt = 0;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
put(index, *vi, cnt++);
}
Modified: trunk/libs/graph/test/make_maximal_planar_test.cpp
==============================================================================
--- trunk/libs/graph/test/make_maximal_planar_test.cpp (original)
+++ trunk/libs/graph/test/make_maximal_planar_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -24,7 +24,7 @@
typename property_map<Graph, edge_index_t>::type index = get(edge_index, g);
typename graph_traits<Graph>::edge_iterator ei, ei_end;
typename graph_traits<Graph>::edges_size_type cnt = 0;
- for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
put(index, *ei, cnt++);
}
@@ -56,7 +56,7 @@
typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g);
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
typename graph_traits<Graph>::vertices_size_type cnt = 0;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
put(index, *vi, cnt++);
}
};
@@ -89,7 +89,7 @@
embedding_t embedding(embedding_storage.begin(), get(vertex_index, g));
typename graph_traits<Graph>::vertex_iterator vi, vi_end;
- for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
std::copy(out_edges(*vi,g).first, out_edges(*vi,g).second, std::back_inserter(embedding[*vi]));
BOOST_CHECK(boyer_myrvold_planarity_test(g));
Modified: trunk/libs/graph/test/parallel_edges_loops_test.cpp
==============================================================================
--- trunk/libs/graph/test/parallel_edges_loops_test.cpp (original)
+++ trunk/libs/graph/test/parallel_edges_loops_test.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -111,7 +111,7 @@
vertex_iterator_t vi, vi_end;
long count = 0;
long mult_count = 0;
- for(tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
{
if (count % vertex_stride == 0)
{
@@ -210,7 +210,7 @@
// Initialize the interior edge index
property_map<graph, edge_index_t>::type e_index = get(edge_index, g);
e_size_t edge_count = 0;
- for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
put(e_index, *ei, edge_count++);
// Initialize the interior vertex index - not needed if the vertices
@@ -218,7 +218,7 @@
/*
property_map<graph, vertex_index_t>::type v_index = get(vertex_index, g);
v_size_t vertex_count = 0;
- for(tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ for(boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
put(v_index, *vi, vertex_count++);
*/
Modified: trunk/libs/graph/test/test_construction.hpp
==============================================================================
--- trunk/libs/graph/test/test_construction.hpp (original)
+++ trunk/libs/graph/test/test_construction.hpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -93,7 +93,7 @@
std::cout << "...connect_normal\n";
Pair *f, *l;
- for(tie(f, l) = edge_pairs(); f != l; ++f) {
+ for(boost::tie(f, l) = edge_pairs(); f != l; ++f) {
Pair const& e = *f;
add_edge(verts[e.first], verts[e.second], g);
}
Modified: trunk/libs/graph/test/transitive_closure_test2.cpp
==============================================================================
--- trunk/libs/graph/test/transitive_closure_test2.cpp (original)
+++ trunk/libs/graph/test/transitive_closure_test2.cpp 2011-11-10 10:04:27 EST (Thu, 10 Nov 2011)
@@ -29,7 +29,7 @@
<< endl;
cout << "transitive closure: ";
graph_t::edge_iterator i,iend;
- for(tie(i,iend) = edges(g_TC);i!=iend;++i) {
+ for(boost::tie(i,iend) = edges(g_TC);i!=iend;++i) {
cout << source(*i,g_TC) << "->" << target(*i,g_TC) << " ";
}
cout << endl;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk