Open
Graph Drawing
Framework

 v.2010.10
 

DualGraph.h

Go to the documentation of this file.
00001 /*
00002  * $Revision: 2027 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2010-09-01 11:55:17 +0200 (Wed, 01 Sep 2010) $ 
00007  ***************************************************************/
00008  
00052 #ifdef _MSC_VER
00053 #pragma once
00054 #endif
00055 
00056 #ifndef OGDF_DUAL_GRAPH_H
00057 #define OGDF_DUAL_GRAPH_H
00058 
00059 
00060 #include <ogdf/basic/CombinatorialEmbedding.h>
00061 #include <ogdf/basic/NodeArray.h>
00062 #include <ogdf/basic/EdgeArray.h>
00063 #include <ogdf/basic/FaceArray.h>
00064 
00065 namespace ogdf {
00066 
00068 class OGDF_EXPORT DualGraph : public CombinatorialEmbedding
00069 {
00070  public:
00072     DualGraph(CombinatorialEmbedding &CE);
00074     ~DualGraph();
00076     const CombinatorialEmbedding &getPrimalEmbedding() const { return *m_primalEmbedding; }
00078     const Graph &getPrimalGraph() const { return m_primalEmbedding->getGraph(); }
00079 
00081 
00085     const node &primalNode(face f) const { return m_primalNode[f]; }
00087 
00091     const edge &primalEdge(edge e) const { return m_primalEdge[e]; }
00093 
00097     const face &primalFace(node v) const { return m_primalFace[v]; }
00099 
00103     const node &dualNode(face f) const { return m_dualNode[f]; }
00105 
00109     const edge &dualEdge(edge e) const { return m_dualEdge[e]; }
00111 
00115     const face &dualFace(node v) const { return m_dualFace[v]; }
00116     
00117  protected:
00118     CombinatorialEmbedding *m_primalEmbedding; 
00119     FaceArray<node> m_primalNode; 
00120     NodeArray<face> m_primalFace; 
00121     EdgeArray<edge> m_primalEdge; 
00122     FaceArray<node> m_dualNode; 
00123     NodeArray<face> m_dualFace; 
00124     EdgeArray<edge> m_dualEdge; 
00125 }; // class DualGraph
00126 
00127 } // end namespace ogdf
00128 
00129 #endif