Clone function that takes a vertex and returns a copy of it.
Clone function that takes an edge datum and returns a copy of it.
A copy of this graph.
Creates an independent copy of this graph data structure and maps each vertex and edge datum to a new vertex and edge datum. Further changes to this graph are not reflected in the returned copy, and vice-versa.
The given mapper functions must be reversible, ie. they must map each vertex/edge datum to another one, and each mapped vertex/edge datum may occur only at most once. It is an error to map two different vertices to the same vertex.
Type of the mapped vertices.
Type of the cloned edge data.
Mapping function that takes a vertex and returns a mapped copy of it.
Mapping function that takes an edge datum and returns a mapped copy of it.
A mapped copy of this graph.
Generated using TypeDoc
Creates an independent copy of this graph data structure. Further changes to this graph are not reflected in the returned copy, and vice-versa.
All vertices and edges are copied as-is and are not cloned, so that changing the state of a vertex or edge also changes the state of the vertex or edge in the copied graph.
Optionally you can also pass a function for cloning the vertices and edges.