Open
Graph Drawing
Framework

 v.2012.05
 

FastPlanarSubgraph.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 
00047 #ifndef OGDF_FAST_PLANAR_SUBGRAPH_H
00048 #define OGDF_FAST_PLANAR_SUBGRAPH_H
00049 
00050 
00051 
00052 #include <ogdf/module/PlanarSubgraphModule.h>
00053 
00054 
00055 namespace ogdf {
00056 
00078 class OGDF_EXPORT FastPlanarSubgraph : public PlanarSubgraphModule{
00079 
00080 public:
00082     FastPlanarSubgraph() : PlanarSubgraphModule() {
00083         m_nRuns = 0;
00084     };
00085 
00086     // destructor
00087     ~FastPlanarSubgraph() {};
00088 
00089 
00090     // options
00091 
00093     void runs (int nRuns) {
00094         m_nRuns = nRuns;
00095     }
00096 
00098     int runs() const {
00099         return m_nRuns;
00100     }
00101 
00102 
00103 protected:
00105 
00108     ReturnType doCall(const Graph &G,
00109         const List<edge> &preferedEdges,
00110         List<edge> &delEdges,
00111         const EdgeArray<int>  *pCost,
00112         bool preferedImplyPlanar);
00113 
00114 
00115 private:
00116     int m_nRuns;  
00117 
00118 
00120 
00122     void computeDelEdges(const Graph &G,
00123         const EdgeArray<int> *pCost,
00124         const EdgeArray<edge> *backTableEdges,
00125         List<edge> &delEdges);
00126 
00128 
00130     void planarize(const Graph &G,
00131                    NodeArray<int> &numbering,
00132                    List<edge> &delEdges);
00133 };
00134 
00135 }
00136 #endif