Open
Graph Drawing
Framework

 v.2012.05
 

DualGraph.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00042 #ifdef _MSC_VER
00043 #pragma once
00044 #endif
00045 
00046 #ifndef OGDF_DUAL_GRAPH_H
00047 #define OGDF_DUAL_GRAPH_H
00048 
00049 
00050 #include <ogdf/basic/CombinatorialEmbedding.h>
00051 #include <ogdf/basic/NodeArray.h>
00052 #include <ogdf/basic/EdgeArray.h>
00053 #include <ogdf/basic/FaceArray.h>
00054 
00055 namespace ogdf {
00056 
00058 class OGDF_EXPORT DualGraph : public CombinatorialEmbedding
00059 {
00060  public:
00062     DualGraph(CombinatorialEmbedding &CE);
00064     ~DualGraph();
00066     const CombinatorialEmbedding &getPrimalEmbedding() const { return *m_primalEmbedding; }
00068     const Graph &getPrimalGraph() const { return m_primalEmbedding->getGraph(); }
00069 
00071 
00075     const node &primalNode(face f) const { return m_primalNode[f]; }
00077 
00081     const edge &primalEdge(edge e) const { return m_primalEdge[e]; }
00083 
00087     const face &primalFace(node v) const { return m_primalFace[v]; }
00089 
00093     const node &dualNode(face f) const { return m_dualNode[f]; }
00095 
00099     const edge &dualEdge(edge e) const { return m_dualEdge[e]; }
00101 
00105     const face &dualFace(node v) const { return m_dualFace[v]; }
00106     
00107  protected:
00108     CombinatorialEmbedding *m_primalEmbedding; 
00109     FaceArray<node> m_primalNode; 
00110     NodeArray<face> m_primalFace; 
00111     EdgeArray<edge> m_primalEdge; 
00112     FaceArray<node> m_dualNode; 
00113     NodeArray<face> m_dualFace; 
00114     EdgeArray<edge> m_dualEdge; 
00115 }; // class DualGraph
00116 
00117 } // end namespace ogdf
00118 
00119 #endif