#include <GraphCopy.h>

Public Member Functions | |
| GraphCopySimple (const Graph &G) | |
| Constructs a copy of graph G. | |
| GraphCopySimple (const GraphCopySimple &GC) | |
| Copy constructor. | |
| virtual | ~GraphCopySimple () |
| const Graph & | original () const |
| Returns a reference to the original graph. | |
| node | original (node v) const |
| Returns the node in the original graph corresponding to v. | |
| edge | original (edge e) const |
| Returns the edge in the original graph corresponding to e. | |
| node | copy (node v) const |
| Returns the node in the graph copy corresponding to v. | |
| edge | copy (edge e) const |
| Returns the edge in the graph copy corresponding to e. | |
| bool | isDummy (node v) const |
| Returns true iff v has no corresponding node in the original graph. | |
| bool | isDummy (edge e) const |
| Returns true iff e has no corresponding edge in the original graph. | |
| GraphCopySimple & | operator= (const GraphCopySimple &GC) |
| Assignment operator. | |
| node | newNode () |
| Creates a new node in the graph copy. | |
| node | newNode (node vOrig) |
| Creates a new node in the graph copy with original node vOrig. | |
| edge | newEdge (node v, node w) |
| Creates a new edge from v to w in the graph copy. | |
| edge | newEdge (edge eOrig) |
| Creates a new edge in the graph copy with original edge eOrig. | |
Private Member Functions | |
| void | initGC (const GraphCopySimple &GC, NodeArray< node > &vCopy, EdgeArray< edge > &eCopy) |
Private Attributes | |
| const Graph * | m_pGraph |
| The original graph. | |
| NodeArray< node > | m_vOrig |
| The corresponding node in the original graph. | |
| NodeArray< node > | m_vCopy |
| The corresponding node in the graph copy. | |
| EdgeArray< edge > | m_eOrig |
| The corresponding edge in the original graph. | |
| EdgeArray< edge > | m_eCopy |
| The corresponding edge in the graph copy. | |
The class GraphCopySimple represents a copy of a graph and maintains a mapping between the nodes and edges of the original graph to the copy and vice versa.
New nodes and edges can be added to the copy; the counterpart of those nodes and edges is 0 indicating that there is no counterpart. This class does not support splitting of edges in such a way that both edges resulting from the split are mapped to the same original edge; this feature is provided by GraphCopy.
Definition at line 87 of file GraphCopy.h.
| ogdf::GraphCopySimple::GraphCopySimple | ( | const Graph & | G | ) |
Constructs a copy of graph G.
| ogdf::GraphCopySimple::GraphCopySimple | ( | const GraphCopySimple & | GC | ) |
Copy constructor.
| virtual ogdf::GraphCopySimple::~GraphCopySimple | ( | ) | [inline, virtual] |
Definition at line 104 of file GraphCopy.h.
| const Graph& ogdf::GraphCopySimple::original | ( | ) | const [inline] |
Returns the node in the original graph corresponding to v.
| v | is a node in the graph copy. |
Definition at line 115 of file GraphCopy.h.
Returns the edge in the original graph corresponding to e.
| e | is an edge in the graph copy. |
Definition at line 123 of file GraphCopy.h.
Returns the node in the graph copy corresponding to v.
| v | is a node in the original graph. |
Definition at line 130 of file GraphCopy.h.
Returns the edge in the graph copy corresponding to e.
| e | is an edge in the original graph. |
Definition at line 137 of file GraphCopy.h.
| bool ogdf::GraphCopySimple::isDummy | ( | node | v | ) | const [inline] |
Returns true iff v has no corresponding node in the original graph.
| v | is a node in the graph copy. |
Definition at line 143 of file GraphCopy.h.
| bool ogdf::GraphCopySimple::isDummy | ( | edge | e | ) | const [inline] |
Returns true iff e has no corresponding edge in the original graph.
| e | is an edge in the graph copy. |
Definition at line 149 of file GraphCopy.h.
| GraphCopySimple& ogdf::GraphCopySimple::operator= | ( | const GraphCopySimple & | GC | ) |
Assignment operator.
| node ogdf::GraphCopySimple::newNode | ( | ) | [inline] |
Creates a new node in the graph copy.
Reimplemented from ogdf::Graph.
Definition at line 156 of file GraphCopy.h.
Creates a new node in the graph copy with original node vOrig.
Definition at line 165 of file GraphCopy.h.
Creates a new edge from v to w in the graph copy.
Reimplemented from ogdf::Graph.
Definition at line 173 of file GraphCopy.h.
Creates a new edge in the graph copy with original edge eOrig.
Definition at line 182 of file GraphCopy.h.
| void ogdf::GraphCopySimple::initGC | ( | const GraphCopySimple & | GC, | |
| NodeArray< node > & | vCopy, | |||
| EdgeArray< edge > & | eCopy | |||
| ) | [private] |
const Graph* ogdf::GraphCopySimple::m_pGraph [private] |
NodeArray<node> ogdf::GraphCopySimple::m_vOrig [private] |
NodeArray<node> ogdf::GraphCopySimple::m_vCopy [private] |
EdgeArray<edge> ogdf::GraphCopySimple::m_eOrig [private] |
EdgeArray<edge> ogdf::GraphCopySimple::m_eCopy [private] |