template <class VertexListGraph, class MutableGraph> void copy_graph(const VertexListGraph& G, MutableGraph& G_copy, const bgl_named_params<P, T, R>& params = all defaults)This function copies all of the vertices and edges from graph G into G_copy. Also, it copies the vertex and edge properties, either by using the vertex_all and edge_all property maps, or by user-supplied copy functions.
A directed or undirected graph. The graph type must be a model of Vertex List Graph.OUT: MutableGraph& G_copy
The resulting copy of the graph. The graph type must be a model of Mutable Graph.
This is a Binary Function that copies the properties of a vertex in the original graph into the corresponding vertex in the copy.IN: edge_copy(EdgeCopier ec)
Default: vertex_copier<VertexListGraph, MutableGraph> which uses the property tag vertex_all to access a property map from the graph.
This is a Binary Function that copies the properties of an edge in the original graph into the corresponding edge in the copy.IN: vertex_index_map(VertexIndexMap i_map)
Default: edge_copier<VertexListGraph, MutableGraph> which uses the property tag edge_all to access a property map from the graph.
The vertex index map type must be a model of Readable Property Map and must map the vertex descriptors of G to the integers in the half-open range [0,num_vertices(G)).UTIL/OUT: orig_to_copy(Orig2CopyMap c)
Default: get(vertex_index, G). Note: if you use this default, make sure your graph has an internal vertex_index property. For example, adjacenty_list with VertexList=listS does not have an internal vertex_index property.
This maps vertices in the original graph to vertices in the copy. Default: an iterator_property_map created from a std::vector of the output graph's vertex descriptor type of size num_vertices(g) and using the i_map for the index map.
The time complexity is O(V + E).
|Copyright © 2000-2001||Jeremy Siek, Indiana University (email@example.com)|