Open
Graph Drawing
Framework

 v.2012.05
 

MMSubgraphPlanarizer.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  
00043 #ifndef OGDF_MM_SUBGRAPH_PLANARIZER_H
00044 #define OGDF_MM_SUBGRAPH_PLANARIZER_H
00045 
00046 #include <ogdf/module/MMCrossingMinimizationModule.h>
00047 #include <ogdf/module/PlanarSubgraphModule.h>
00048 #include <ogdf/module/MMEdgeInsertionModule.h>
00049 #include <ogdf/basic/ModuleOption.h>
00050 
00051 
00052 namespace ogdf
00053 {
00054 
00059 class OGDF_EXPORT MMSubgraphPlanarizer : public MMCrossingMinimizationModule
00060 {
00061 public:
00063     MMSubgraphPlanarizer();
00064 
00066     void setSubgraph(PlanarSubgraphModule *pSubgraph) {
00067         m_subgraph.set(pSubgraph);
00068     }
00069 
00071     void setInserter(MMEdgeInsertionModule *pInserter) {
00072         m_inserter.set(pInserter);
00073     }
00074 
00076     int permutations() { return m_permutations; }
00077 
00079     void permutations(int p) { m_permutations = p; }
00080 
00081 protected:
00082     virtual ReturnType doCall(PlanRepExpansion &PG,
00083         int cc,
00084         const EdgeArray<bool> *forbid, 
00085         int& crossingNumber,
00086         int& numNS,
00087         int& numSN);
00088 
00089 private:
00090     ModuleOption<PlanarSubgraphModule>  m_subgraph; 
00091     ModuleOption<MMEdgeInsertionModule> m_inserter; 
00092 
00093     int m_permutations; 
00094 };
00095 
00096 }
00097 
00098 #endif