Open
Graph Drawing
Framework

 v.2007.11
 

DualGraph.h

Go to the documentation of this file.
00001 /*
00002  * $Revision:  $
00003  * 
00004  * last checkin:
00005  *   $Author:  $ 
00006  *   $Date:  $ 
00007  ***************************************************************/
00008  
00050 #ifdef _MSC_VER
00051 #pragma once
00052 #endif
00053 
00054 #ifndef OGDF_DUAL_GRAPH_H
00055 #define OGDF_DUAL_GRAPH_H
00056 
00057 
00058 #include <ogdf/basic/CombinatorialEmbedding.h>
00059 #include <ogdf/basic/NodeArray.h>
00060 #include <ogdf/basic/EdgeArray.h>
00061 #include <ogdf/basic/FaceArray.h>
00062 
00063 namespace ogdf {
00064 
00066 class DualGraph : public CombinatorialEmbedding
00067 {
00068  public:
00070     DualGraph(CombinatorialEmbedding &CE);
00072     ~DualGraph();
00074     const CombinatorialEmbedding &getPrimalEmbedding() const { return *m_primalEmbedding; }
00076     const Graph &getPrimalGraph() const { return m_primalEmbedding->getGraph(); }
00077 
00079 
00083     const node &primalNode(face f) const { return m_primalNode[f]; }
00085 
00089     const edge &primalEdge(edge e) const { return m_primalEdge[e]; }
00091 
00095     const face &primalFace(node v) const { return m_primalFace[v]; }
00097 
00101     const node &dualNode(face f) const { return m_dualNode[f]; }
00103 
00107     const edge &dualEdge(edge e) const { return m_dualEdge[e]; }
00109 
00113     const face &dualFace(node v) const { return m_dualFace[v]; }
00114     
00115  protected:
00116     CombinatorialEmbedding *m_primalEmbedding; 
00117     FaceArray<node> m_primalNode; 
00118     NodeArray<face> m_primalFace; 
00119     EdgeArray<edge> m_primalEdge; 
00120     FaceArray<node> m_dualNode; 
00121     NodeArray<face> m_dualFace; 
00122     EdgeArray<edge> m_dualEdge; 
00123 }; // class DualGraph
00124 
00125 } // end namespace ogdf
00126 
00127 #endif


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

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