Ticket #6112: graph.patch
File graph.patch, 17.3 KB (added by , 11 years ago) |
---|
-
boost/graph/chrobak_payne_drawing.hpp
240 240 (*ordering_begin,0,g,x,delta_x,left,right); 241 241 242 242 vertex_iterator_t vi, vi_end; 243 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)243 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 244 244 { 245 245 vertex_t v(*vi); 246 246 drawing[v].x = x[v]; -
boost/graph/closeness_centrality.hpp
126 126 typedef typename property_traits<CentralityMap>::value_type Centrality; 127 127 128 128 typename graph_traits<Graph>::vertex_iterator i, end; 129 for( tie(i, end) = vertices(g); i != end; ++i) {129 for(boost::tie(i, end) = vertices(g); i != end; ++i) { 130 130 DistanceMap dm = get(dist, *i); 131 131 Centrality c = closeness_centrality(g, dm, measure); 132 132 put(cent, *i, c); -
boost/graph/degree_centrality.hpp
101 101 typedef typename property_traits<CentralityMap>::value_type Centrality; 102 102 103 103 VertexIterator i, end; 104 for( tie(i, end) = vertices(g); i != end; ++i) {104 for(boost::tie(i, end) = vertices(g); i != end; ++i) { 105 105 Centrality c = degree_centrality(g, *i, measure); 106 106 put(cent, *i, c); 107 107 } -
boost/graph/detail/geodesic.hpp
65 65 // zero, so it shouldn't be too problematic. 66 66 Distance ret = init; 67 67 VertexIterator i, end; 68 for( tie(i, end) = vertices(g); i != end; ++i) {68 for(boost::tie(i, end) = vertices(g); i != end; ++i) { 69 69 Vertex v = *i; 70 70 if(get(dist, v) != DistanceNumbers::infinity()) { 71 71 ret = combine(ret, get(dist, v)); -
boost/graph/geodesic_distance.hpp
156 156 Result inf = numeric_values<Result>::infinity(); 157 157 Result sum = numeric_values<Result>::zero(); 158 158 VertexIterator i, end; 159 for( tie(i, end) = vertices(g); i != end; ++i) {159 for(boost::tie(i, end) = vertices(g); i != end; ++i) { 160 160 DistanceMap dm = get(dist, *i); 161 161 Result r = mean_geodesic(g, dm, measure); 162 162 put(geo, *i, r); -
boost/graph/is_kuratowski_subgraph.hpp
33 33 { 34 34 typename graph_traits<Graph>::vertex_iterator vi, vi_end, inner_vi; 35 35 Graph K_5(5); 36 for( tie(vi,vi_end) = vertices(K_5); vi != vi_end; ++vi)36 for(boost::tie(vi,vi_end) = vertices(K_5); vi != vi_end; ++vi) 37 37 for(inner_vi = next(vi); inner_vi != vi_end; ++inner_vi) 38 38 add_edge(*vi, *inner_vi, K_5); 39 39 return K_5; … … 47 47 vi, vi_end, bipartition_start, inner_vi; 48 48 Graph K_3_3(6); 49 49 bipartition_start = next(next(next(vertices(K_3_3).first))); 50 for( tie(vi, vi_end) = vertices(K_3_3); vi != bipartition_start; ++vi)50 for(boost::tie(vi, vi_end) = vertices(K_3_3); vi != bipartition_start; ++vi) 51 51 for(inner_vi= bipartition_start; inner_vi != vi_end; ++inner_vi) 52 52 add_edge(*vi, *inner_vi, K_3_3); 53 53 return K_3_3; … … 158 158 { 159 159 160 160 vertex_iterator_t vi, vi_end; 161 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)161 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 162 162 { 163 163 vertex_t v(*vi); 164 164 … … 242 242 if (max_size == 3) 243 243 { 244 244 // check to see whether we should go on to find a K_5 245 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)245 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 246 246 if (neighbors[*vi].size() == 4) 247 247 { 248 248 target_graph = detail::tg_k_5; … … 261 261 v_list_t main_vertices; 262 262 vertex_iterator_t vi, vi_end; 263 263 264 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)264 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 265 265 { 266 266 if (!neighbors[*vi].empty()) 267 267 main_vertices.push_back(*vi); -
boost/graph/is_straight_line_drawing.hpp
126 126 active_map_t active_edges; 127 127 128 128 edge_iterator_t ei, ei_end; 129 for( tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)129 for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) 130 130 { 131 131 edge_t e(*ei); 132 132 vertex_t s(source(e,g)); -
boost/graph/make_maximal_planar.hpp
62 62 degree(degree_vector.begin(), vm) 63 63 { 64 64 vertex_iterator_t vi, vi_end; 65 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)65 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 66 66 put(degree, *vi, out_degree(*vi, g)); 67 67 } 68 68 … … 117 117 118 118 // Mark all of the min degree vertex's neighbors 119 119 adjacency_iterator_t ai, ai_end; 120 for( tie(ai,ai_end) = adjacent_vertices(vertices_on_face.front(),g);120 for(boost::tie(ai,ai_end) = adjacent_vertices(vertices_on_face.front(),g); 121 121 ai != ai_end; ++ai 122 122 ) 123 123 { -
boost/graph/planar_canonical_ordering.hpp
67 67 vertex_t first_vertex = *vertices(g).first; 68 68 vertex_t second_vertex; 69 69 adjacency_iterator_t ai, ai_end; 70 for( tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai)70 for(boost::tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai) 71 71 { 72 72 if (*ai == first_vertex) 73 73 continue; -
boost/graph/planar_face_traversal.hpp
98 98 // PlanarEmbedding so that get(next_edge, e)[v] is the edge that comes 99 99 // after e in the clockwise embedding around vertex v. 100 100 101 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)101 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 102 102 { 103 103 vertex_t v(*vi); 104 104 pi_begin = embedding[v].begin(); … … 122 122 std::vector<edge_t> edges_cache; 123 123 std::vector<vertex_t> vertices_in_edge; 124 124 125 for( tie(fi,fi_end) = edges(g); fi != fi_end; ++fi)125 for(boost::tie(fi,fi_end) = edges(g); fi != fi_end; ++fi) 126 126 { 127 127 edge_t e(*fi); 128 128 edges_cache.push_back(e); -
boost/graph/tiernan_all_cycles.hpp
193 193 u = p.back(), 194 194 v = p.front(); 195 195 OutIterator i, end; 196 for( tie(i, end) = out_edges(u, g); i != end; ++i) {196 for(boost::tie(i, end) = out_edges(u, g); i != end; ++i) { 197 197 if((target(*i, g) == v)) { 198 198 return true; 199 199 } … … 220 220 221 221 // AdjacencyIterator i, end; 222 222 OutIterator i, end; 223 for( tie(i, end) = out_edges(u, g); i != end; ++i) {223 for(boost::tie(i, end) = out_edges(u, g); i != end; ++i) { 224 224 Vertex v = target(*i, g); 225 225 226 226 // if we can actually extend along this edge, … … 324 324 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 325 325 326 326 VertexIterator i, end; 327 for( tie(i, end) = vertices(g); i != end; ++i) {327 for(boost::tie(i, end) = vertices(g); i != end; ++i) { 328 328 detail::all_cycles_from_vertex(g, *i, vis, minlen, maxlen); 329 329 } 330 330 } -
boost/graph/write_dimacs.hpp
64 64 65 65 //output the edges 66 66 edge_iterator ei, e_end; 67 for( tie(ei,e_end) = edges(g); ei!=e_end; ++ei){67 for(boost::tie(ei,e_end) = edges(g); ei!=e_end; ++ei){ 68 68 out << "a " << idx[ source(*ei, g) ] + 1 << " " << idx[ target(*ei, g) ] + 1 << " " << get(capacity,*ei) << std::endl; 69 69 } 70 70 } -
libs/graph/test/all_planar_input_files_test.cpp
137 137 // Initialize the interior edge index 138 138 property_map<graph, edge_index_t>::type e_index = get(edge_index, g); 139 139 e_size_t edge_count = 0; 140 for( tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)140 for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) 141 141 put(e_index, *ei, edge_count++); 142 142 143 143 // Initialize the interior vertex index - not needed if the vertices -
libs/graph/test/basic_planarity_test.cpp
25 25 typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g); 26 26 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 27 27 typename graph_traits<Graph>::vertices_size_type cnt = 0; 28 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)28 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 29 29 put(index, *vi, cnt++); 30 30 } 31 31 }; -
libs/graph/test/bellman-test.cpp
42 42 weight_pmap = get(edge_weight, g); 43 43 44 44 int i = 0; 45 for( tie(ei, ei_end) = edges(g); ei != ei_end; ++ei, ++i)45 for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei, ++i) 46 46 weight_pmap[*ei] = weight[i]; 47 47 48 48 std::vector<int> parent(numVertex); -
libs/graph/test/labeled_graph.cpp
62 62 typedef typename graph_traits<Graph>::vertex_iterator Iter; 63 63 Iter f, l; 64 64 int x = 0; 65 for( tie(f, l) = vertices(g); f != l; ++f, ++x) {65 for(boost::tie(f, l) = vertices(g); f != l; ++f, ++x) { 66 66 label_vertex(*f, x, g); 67 67 } 68 68 } -
libs/graph/test/make_bicon_planar_test.cpp
25 25 typename property_map<Graph, edge_index_t>::type index = get(edge_index, g); 26 26 typename graph_traits<Graph>::edge_iterator ei, ei_end; 27 27 typename graph_traits<Graph>::edges_size_type cnt = 0; 28 for( tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)28 for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) 29 29 put(index, *ei, cnt++); 30 30 } 31 31 … … 54 54 typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g); 55 55 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 56 56 typename graph_traits<Graph>::vertices_size_type cnt = 0; 57 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)57 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 58 58 put(index, *vi, cnt++); 59 59 } 60 60 }; … … 87 87 embedding_t embedding(embedding_storage.begin(), get(vertex_index, g)); 88 88 89 89 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 90 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)90 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 91 91 std::copy(out_edges(*vi,g).first, out_edges(*vi,g).second, std::back_inserter(embedding[*vi])); 92 92 93 93 BOOST_CHECK(biconnected_components(g, make_vector_property_map<int>(get(edge_index,g))) > 1); -
libs/graph/test/make_connected_test.cpp
24 24 typename property_map<Graph, edge_index_t>::type index = get(edge_index, g); 25 25 typename graph_traits<Graph>::edge_iterator ei, ei_end; 26 26 typename graph_traits<Graph>::edges_size_type cnt = 0; 27 for( tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)27 for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) 28 28 put(index, *ei, cnt++); 29 29 } 30 30 … … 36 36 typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g); 37 37 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 38 38 typename graph_traits<Graph>::vertices_size_type cnt = 0; 39 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)39 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 40 40 put(index, *vi, cnt++); 41 41 } 42 42 -
libs/graph/test/make_maximal_planar_test.cpp
24 24 typename property_map<Graph, edge_index_t>::type index = get(edge_index, g); 25 25 typename graph_traits<Graph>::edge_iterator ei, ei_end; 26 26 typename graph_traits<Graph>::edges_size_type cnt = 0; 27 for( tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)27 for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) 28 28 put(index, *ei, cnt++); 29 29 } 30 30 … … 56 56 typename property_map<Graph, vertex_index_t>::type index = get(vertex_index, g); 57 57 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 58 58 typename graph_traits<Graph>::vertices_size_type cnt = 0; 59 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)59 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 60 60 put(index, *vi, cnt++); 61 61 } 62 62 }; … … 89 89 embedding_t embedding(embedding_storage.begin(), get(vertex_index, g)); 90 90 91 91 typename graph_traits<Graph>::vertex_iterator vi, vi_end; 92 for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)92 for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) 93 93 std::copy(out_edges(*vi,g).first, out_edges(*vi,g).second, std::back_inserter(embedding[*vi])); 94 94 95 95 BOOST_CHECK(boyer_myrvold_planarity_test(g)); -
libs/graph/test/parallel_edges_loops_test.cpp
111 111 vertex_iterator_t vi, vi_end; 112 112 long count = 0; 113 113 long mult_count = 0; 114 for( tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)114 for(boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) 115 115 { 116 116 if (count % vertex_stride == 0) 117 117 { … … 210 210 // Initialize the interior edge index 211 211 property_map<graph, edge_index_t>::type e_index = get(edge_index, g); 212 212 e_size_t edge_count = 0; 213 for( tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)213 for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) 214 214 put(e_index, *ei, edge_count++); 215 215 216 216 // Initialize the interior vertex index - not needed if the vertices -
libs/graph/test/test_construction.hpp
93 93 94 94 std::cout << "...connect_normal\n"; 95 95 Pair *f, *l; 96 for( tie(f, l) = edge_pairs(); f != l; ++f) {96 for(boost::tie(f, l) = edge_pairs(); f != l; ++f) { 97 97 Pair const& e = *f; 98 98 add_edge(verts[e.first], verts[e.second], g); 99 99 } -
libs/graph/test/transitive_closure_test2.cpp
29 29 << endl; 30 30 cout << "transitive closure: "; 31 31 graph_t::edge_iterator i,iend; 32 for( tie(i,iend) = edges(g_TC);i!=iend;++i) {32 for(boost::tie(i,iend) = edges(g_TC);i!=iend;++i) { 33 33 cout << source(*i,g_TC) << "->" << target(*i,g_TC) << " "; 34 34 } 35 35 cout << endl;