Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::GraphCopySimple Class Reference

Copies of graphs with mapping between nodes and edges. More...

#include <GraphCopy.h>

Inheritance diagram for ogdf::GraphCopySimple:

ogdf::Graph

List of all members.

Public Member Functions

 GraphCopySimple (const Graph &G)
 Constructs a copy of graph G.
 GraphCopySimple (const GraphCopySimple &GC)
 Copy constructor.
virtual ~GraphCopySimple ()
const Graphoriginal () 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.
GraphCopySimpleoperator= (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 Graphm_pGraph
 The original graph.
NodeArray< nodem_vOrig
 The corresponding node in the original graph.
NodeArray< nodem_vCopy
 The corresponding node in the graph copy.
EdgeArray< edgem_eOrig
 The corresponding edge in the original graph.
EdgeArray< edgem_eCopy
 The corresponding edge in the graph copy.


Detailed Description

Copies of graphs with mapping between nodes and edges.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

const Graph& ogdf::GraphCopySimple::original (  )  const [inline]

Returns a reference to the original graph.

Definition at line 107 of file GraphCopy.h.

node ogdf::GraphCopySimple::original ( node  v  )  const [inline]

Returns the node in the original graph corresponding to v.

Parameters:
v is a node in the graph copy.
Returns:
the corresponding node in the original graph, or 0 if no such node exists.

Definition at line 115 of file GraphCopy.h.

edge ogdf::GraphCopySimple::original ( edge  e  )  const [inline]

Returns the edge in the original graph corresponding to e.

Parameters:
e is an edge in the graph copy.
Returns:
the corresponding edge in the original graph, or 0 if no such edge exists.

Definition at line 123 of file GraphCopy.h.

node ogdf::GraphCopySimple::copy ( node  v  )  const [inline]

Returns the node in the graph copy corresponding to v.

Parameters:
v is a node in the original graph.
Returns:
the corresponding node in the graph copy.

Definition at line 130 of file GraphCopy.h.

edge ogdf::GraphCopySimple::copy ( edge  e  )  const [inline]

Returns the edge in the graph copy corresponding to e.

Parameters:
e is an edge in the original graph.
Returns:
the corresponding edge in the graph copy.

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.

Parameters:
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.

Parameters:
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.

node ogdf::GraphCopySimple::newNode ( node  vOrig  )  [inline]

Creates a new node in the graph copy with original node vOrig.

Warning:
You have to make sure that the original node makes sense, in particular that vOrig is not the original node of another node in the copy.

Definition at line 165 of file GraphCopy.h.

edge ogdf::GraphCopySimple::newEdge ( node  v,
node  w 
) [inline]

Creates a new edge from v to w in the graph copy.

Reimplemented from ogdf::Graph.

Definition at line 173 of file GraphCopy.h.

edge ogdf::GraphCopySimple::newEdge ( edge  eOrig  )  [inline]

Creates a new edge in the graph copy with original edge eOrig.

Warning:
You have to make sure that the original edge makes sense, in particular that eOrig is not the original edge of another edge in the copy.

Definition at line 182 of file GraphCopy.h.

void ogdf::GraphCopySimple::initGC ( const GraphCopySimple GC,
NodeArray< node > &  vCopy,
EdgeArray< edge > &  eCopy 
) [private]


Member Data Documentation

const Graph* ogdf::GraphCopySimple::m_pGraph [private]

The original graph.

Definition at line 89 of file GraphCopy.h.

NodeArray<node> ogdf::GraphCopySimple::m_vOrig [private]

The corresponding node in the original graph.

Definition at line 90 of file GraphCopy.h.

NodeArray<node> ogdf::GraphCopySimple::m_vCopy [private]

The corresponding node in the graph copy.

Definition at line 91 of file GraphCopy.h.

EdgeArray<edge> ogdf::GraphCopySimple::m_eOrig [private]

The corresponding edge in the original graph.

Definition at line 92 of file GraphCopy.h.

EdgeArray<edge> ogdf::GraphCopySimple::m_eCopy [private]

The corresponding edge in the graph copy.

Definition at line 93 of file GraphCopy.h.


The documentation for this class was generated from the following file:

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:07 2007 by doxygen 1.5.4.