Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::DualGraph Class Reference

A dual graph including its combinatorial embedding of an embedded graph. More...

#include <ogdf/basic/DualGraph.h>

+ Inheritance diagram for ogdf::DualGraph:

Public Member Functions

 DualGraph (const ConstCombinatorialEmbedding &CE)
 Constructor; creates dual graph and its combinatorial embedding. More...
 
 ~DualGraph ()
 Destructor. More...
 
const edge & dualEdge (edge e) const
 Returns the edge in the dual graph corresponding to e. More...
 
const face & dualFace (node v) const
 Returns the face in the embedding of the dual graph corresponding to v. More...
 
const node & dualNode (face f) const
 Returns the node in the dual graph corresponding to f. More...
 
const ConstCombinatorialEmbedding & getPrimalEmbedding () const
 Returns a reference to the combinatorial embedding of the primal graph. More...
 
const Graph & getPrimalGraph () const
 Returns a reference to the primal graph. More...
 
const edge & primalEdge (edge e) const
 Returns the edge in the primal graph corresponding to e. More...
 
const face & primalFace (node v) const
 Returns the face in the embedding of the primal graph corresponding to v. More...
 
const node & primalNode (face f) const
 Returns the node in the primal graph corresponding to f. More...
 
- Public Member Functions inherited from ogdf::CombinatorialEmbedding
 CombinatorialEmbedding ()
 Creates a combinatorial embedding associated with no graph. More...
 
 CombinatorialEmbedding (Graph &G)
 Creates a combinatorial embedding of graph G. More...
 
const Graph & getGraph () const
 Returns the associated graph. More...
 
Graph & getGraph ()
 
 operator const Graph & () const
 
 operator Graph & ()
 
void init (Graph &G)
 Initializes the embedding for graph G. More...
 
void clear ()
 Removes all nodes, edges, and faces from the graph and the embedding. More...
 
edge split (edge e)
 Splits edge e=(v,w) into e=(v,u) and e'=(u,w) creating a new node u. More...
 
void unsplit (edge eIn, edge eOut)
 Undoes a split operation. More...
 
node splitNode (adjEntry adjStartLeft, adjEntry adjStartRight)
 Splits a node while preserving the order of adjacency entries. More...
 
node contract (edge e)
 Contracts edge e. More...
 
edge splitFace (adjEntry adjSrc, adjEntry adjTgt)
 Splits a face by inserting a new edge. More...
 
edge addEdgeToIsolatedNode (node v, adjEntry adjTgt)
 Inserts a new edge similarly to splitFace without having to call computeFaces again. More...
 
edge addEdgeToIsolatedNode (adjEntry adjSrc, node v)
 Inserts a new edge similarly to splitFace without having to call computeFaces again. More...
 
face joinFaces (edge e)
 Removes edge e and joins the two faces adjacent to e. More...
 
void reverseEdge (edge e)
 Reverses edges e and updates embedding. More...
 
void moveBridge (adjEntry adjBridge, adjEntry adjBefore)
 Moves a bridge in the graph. More...
 
void removeDeg1 (node v)
 Removes degree-1 node v. More...
 
void updateMerger (edge e, face fRight, face fLeft)
 Update face information after inserting a merger in a copy graph. More...
 
- Public Member Functions inherited from ogdf::ConstCombinatorialEmbedding
 ConstCombinatorialEmbedding ()
 Creates a combinatorial embedding associated with no graph. More...
 
 ConstCombinatorialEmbedding (const Graph &G)
 Creates a combinatorial embedding of graph G. More...
 
 ConstCombinatorialEmbedding (const ConstCombinatorialEmbedding &C)
 Copy constructor. More...
 
ConstCombinatorialEmbedding & operator= (const ConstCombinatorialEmbedding &C)
 Assignment operator. More...
 
virtual ~ConstCombinatorialEmbedding ()
 Destructor. More...
 
bool valid () const
 Returns whether the embedding is associated with a graph. More...
 
const Graph & getGraph () const
 Returns the associated graph of the combinatorial embedding. More...
 
 operator const Graph & () const
 Returns associated graph. More...
 
face firstFace () const
 Returns the first face in the list of all faces. More...
 
face lastFace () const
 Returns the last face in the list of all faces. More...
 
int numberOfFaces () const
 Returns the number of faces. More...
 
face rightFace (adjEntry adj) const
 Returns the face to the right of adj, i.e., the face containing adj. More...
 
face leftFace (adjEntry adj) const
 Returns the face to the left of adj, i.e., the face containing the twin of adj. More...
 
int maxFaceIndex () const
 Returns the largest used face index. More...
 
int faceArrayTableSize () const
 Returns the table size of face arrays associated with this embedding. More...
 
face chooseFace (std::function< bool(face)> includeFace=[](face) { return true;}, bool isFastTest=true) const
 Returns a random face. More...
 
face maximalFace () const
 Returns a face of maximal size. More...
 
face externalFace () const
 Returns the external face. More...
 
void setExternalFace (face f)
 Sets the external face to f. More...
 
bool isBridge (edge e) const
 
void init (const Graph &G)
 Initializes the embedding for graph G. More...
 
void init ()
 
void computeFaces ()
 Computes the list of faces. More...
 
bool consistencyCheck ()
 Checks the consistency of the data structure. More...
 
ListIterator< FaceArrayBase * > registerArray (FaceArrayBase *pFaceArray) const
 Registers the face array pFaceArray. More...
 
void unregisterArray (ListIterator< FaceArrayBase *> it) const
 Unregisters the face array identified by it. More...
 
void moveRegisterArray (ListIterator< FaceArrayBase *> it, FaceArrayBase *pFaceArray) const
 Move the registration it of a node array to pFaceArray (used with move semantics for face arrays). More...
 
adjEntry findCommonFace (const node v, const node w, bool left=true) const
 Identifies a common face of two nodes and returns the respective adjacency entry. More...
 
adjEntry findCommonFace (const node v, const node w, adjEntry &adjW, bool left=true) const
 Identifies a common face of two nodes and returns the respective adjacency entry. More...
 

Protected Attributes

EdgeArray< edge > m_dualEdge
 The corresponding edge in the dual graph. More...
 
NodeArray< face > m_dualFace
 The corresponding face in embedding of the dual graph. More...
 
FaceArray< node > m_dualNode
 The corresponding node in the dual graph. More...
 
EdgeArray< edge > m_primalEdge
 The corresponding edge in the primal graph. More...
 
const ConstCombinatorialEmbedding & m_primalEmbedding
 The embedding of the primal graph. More...
 
NodeArray< face > m_primalFace
 The corresponding facee in the embedding of the primal graph. More...
 
FaceArray< node > m_primalNode
 The corresponding node in the primal graph. More...
 
- Protected Attributes inherited from ogdf::ConstCombinatorialEmbedding
const Graph * m_cpGraph
 The associated graph. More...
 
face m_externalFace
 
int m_faceArrayTableSize
 The current table size of face arrays. More...
 
int m_faceIdCount
 The index assigned to the next created face. More...
 
std::mutex m_mutexRegArrays
 The critical section for protecting shared acces to register/unregister methods. More...
 
ListPure< FaceArrayBase * > m_regFaceArrays
 The external face. More...
 
AdjEntryArray< face > m_rightFace
 The face to which an adjacency entry belongs. More...
 

Additional Inherited Members

- Public Types inherited from ogdf::ConstCombinatorialEmbedding
using face_iterator = internal::GraphIterator< face >
 Provides a bidirectional iterator to a face in a combinatorial embedding. More...
 
- Public Attributes inherited from ogdf::ConstCombinatorialEmbedding
internal::GraphObjectContainer< FaceElement > faces
 The container containing all face objects. More...
 
- Protected Member Functions inherited from ogdf::CombinatorialEmbedding
face joinFacesPure (edge e)
 Joins the two faces adjacent to e but does not remove edge e. More...
 
- Protected Member Functions inherited from ogdf::ConstCombinatorialEmbedding
face createFaceElement (adjEntry adjFirst)
 Create a new face. More...
 
void reinitArrays ()
 Reinitialize associated face arrays. More...
 

Detailed Description

A dual graph including its combinatorial embedding of an embedded graph.

Dual edges are rotated counter-clockwise compared to the primal ones.

Definition at line 48 of file DualGraph.h.

Constructor & Destructor Documentation

◆ DualGraph()

ogdf::DualGraph::DualGraph ( const ConstCombinatorialEmbedding &  CE)
explicit

Constructor; creates dual graph and its combinatorial embedding.

◆ ~DualGraph()

ogdf::DualGraph::~DualGraph ( )

Destructor.

Member Function Documentation

◆ dualEdge()

const edge& ogdf::DualGraph::dualEdge ( edge  e) const
inline

Returns the edge in the dual graph corresponding to e.

Parameters
eis an edge in the primal graph
Returns
the corresponding edge in the dual graph

Definition at line 93 of file DualGraph.h.

◆ dualFace()

const face& ogdf::DualGraph::dualFace ( node  v) const
inline

Returns the face in the embedding of the dual graph corresponding to v.

Parameters
vis a node in the primal graph
Returns
the corresponding face in the embedding of the dual graph

Definition at line 100 of file DualGraph.h.

◆ dualNode()

const node& ogdf::DualGraph::dualNode ( face  f) const
inline

Returns the node in the dual graph corresponding to f.

Parameters
fis a face in the embedding of the primal graph
Returns
the corresponding node in the dual graph

Definition at line 86 of file DualGraph.h.

◆ getPrimalEmbedding()

const ConstCombinatorialEmbedding& ogdf::DualGraph::getPrimalEmbedding ( ) const
inline

Returns a reference to the combinatorial embedding of the primal graph.

Definition at line 56 of file DualGraph.h.

◆ getPrimalGraph()

const Graph& ogdf::DualGraph::getPrimalGraph ( ) const
inline

Returns a reference to the primal graph.

Definition at line 58 of file DualGraph.h.

◆ primalEdge()

const edge& ogdf::DualGraph::primalEdge ( edge  e) const
inline

Returns the edge in the primal graph corresponding to e.

Parameters
eis an edge in the dual graph
Returns
the corresponding edge in the primal graph

Definition at line 72 of file DualGraph.h.

◆ primalFace()

const face& ogdf::DualGraph::primalFace ( node  v) const
inline

Returns the face in the embedding of the primal graph corresponding to v.

Parameters
vis a node in the dual graph
Returns
the corresponding face in the embedding of the primal graph

Definition at line 79 of file DualGraph.h.

◆ primalNode()

const node& ogdf::DualGraph::primalNode ( face  f) const
inline

Returns the node in the primal graph corresponding to f.

Parameters
fis a face in the embedding of the dual graph
Returns
the corresponding node in the primal graph

Definition at line 65 of file DualGraph.h.

Member Data Documentation

◆ m_dualEdge

EdgeArray<edge> ogdf::DualGraph::m_dualEdge
protected

The corresponding edge in the dual graph.

Definition at line 109 of file DualGraph.h.

◆ m_dualFace

NodeArray<face> ogdf::DualGraph::m_dualFace
protected

The corresponding face in embedding of the dual graph.

Definition at line 108 of file DualGraph.h.

◆ m_dualNode

FaceArray<node> ogdf::DualGraph::m_dualNode
protected

The corresponding node in the dual graph.

Definition at line 107 of file DualGraph.h.

◆ m_primalEdge

EdgeArray<edge> ogdf::DualGraph::m_primalEdge
protected

The corresponding edge in the primal graph.

Definition at line 106 of file DualGraph.h.

◆ m_primalEmbedding

const ConstCombinatorialEmbedding& ogdf::DualGraph::m_primalEmbedding
protected

The embedding of the primal graph.

Definition at line 103 of file DualGraph.h.

◆ m_primalFace

NodeArray<face> ogdf::DualGraph::m_primalFace
protected

The corresponding facee in the embedding of the primal graph.

Definition at line 105 of file DualGraph.h.

◆ m_primalNode

FaceArray<node> ogdf::DualGraph::m_primalNode
protected

The corresponding node in the primal graph.

Definition at line 104 of file DualGraph.h.


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