Baseclasses
Definition
An instance GC of type GraphCopy is a copy of an original graph G. For each node v' of GC, GraphCopy stores the corresponding node original(v') in the original graph G, for each node v in G the newly created copy copy(v) in GC, for each edge e' in GC the corresponding edge original(e') in G, and for each edge e in G a list of dummy edges chain(e) in GC.
For nodes or edges which are created afterwards with new_node or new_edge, the corresponding node or edge is set to nil.
#include < AGD/GraphCopy.h >
Creation
GraphCopy | GC | creates an instance GC of type GraphCopy initialized to an empty graph without original graph. |
GraphCopy | GC(const leda_graph& G) | creates an instance GC of type GraphCopy initialized to a copy of G. |
GraphCopy | GC(const GraphCopy& GC) | creates an instance GC of type GraphCopy initialized to a copy of original(GC). |
GraphCopy | GC(const GraphCopy& GC, leda_node_array<leda_node>& v_copy, leda_edge_array<leda_edge>& e_copy) | |
creates an instance GC of type GraphCopy initialized
to a copy of
original(GC). Returns in v_copy the newly created
nodes, i.e.,
v![]() ![]() ![]() ![]() |
Operations
Implementation
All operations for graphs are available for instances of type GraphCopy, too. All additional operations take constant time.
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13