Open
Graph Drawing
Framework

 v.2010.10
 

FastPlanarSubgraph.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 
00057 #ifndef OGDF_FAST_PLANAR_SUBGRAPH_H
00058 #define OGDF_FAST_PLANAR_SUBGRAPH_H
00059 
00060 
00061 
00062 #include <ogdf/module/PlanarSubgraphModule.h>
00063 
00064 
00065 namespace ogdf {
00066 
00088 class OGDF_EXPORT FastPlanarSubgraph : public PlanarSubgraphModule{
00089 
00090 public:
00092     FastPlanarSubgraph() : PlanarSubgraphModule() {
00093         m_nRuns = 0;
00094     };
00095 
00096     // destructor
00097     ~FastPlanarSubgraph() {};
00098 
00099 
00100     // options
00101 
00103     void runs (int nRuns) {
00104         m_nRuns = nRuns;
00105     }
00106 
00108     int runs() const {
00109         return m_nRuns;
00110     }
00111 
00112 
00113 protected:
00115 
00118     ReturnType doCall(const Graph &G,
00119         const List<edge> &preferedEdges,
00120         List<edge> &delEdges,
00121         const EdgeArray<int>  *pCost,
00122         bool preferedImplyPlanar);
00123 
00124 
00125 private:
00126     int m_nRuns;  
00127 
00128 
00130 
00132     void computeDelEdges(const Graph &G,
00133         const EdgeArray<int> *pCost,
00134         const EdgeArray<edge> *backTableEdges,
00135         List<edge> &delEdges);
00136 
00138 
00140     void planarize(const Graph &G,
00141                    NodeArray<int> &numbering,
00142                    List<edge> &delEdges);
00143 };
00144 
00145 }
00146 #endif