Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00043 #ifndef OGDF_MM_CROSSING_MINIMIZATION_MODULE_H
00044 #define OGDF_MM_CROSSING_MINIMIZATION_MODULE_H
00045
00046
00047
00048 #include <ogdf/planarity/PlanRepExpansion.h>
00049 #include <ogdf/basic/Module.h>
00050 #include <ogdf/basic/Logger.h>
00051
00052
00053 namespace ogdf {
00054
00059 class OGDF_EXPORT MMCrossingMinimizationModule : public Module
00060 {
00061 public:
00063 MMCrossingMinimizationModule() { m_nodeSplits = 0; }
00064
00065
00066 virtual ~MMCrossingMinimizationModule() { }
00067
00083 ReturnType call(PlanRepExpansion &PG,
00084 int cc,
00085 int& crossingNumber,
00086 const EdgeArray<bool> *forbid = 0)
00087 {
00088 return doCall(PG, cc, forbid, crossingNumber, m_nodeSplits, m_splittedNodes);
00089 };
00090
00101 ReturnType call(const Graph &G, int &cr, const EdgeArray<bool> *forbid = 0);
00102
00114 ReturnType call(const Graph &G,
00115 const List<node> &splittableNodes,
00116 int &cr,
00117 const EdgeArray<bool> *forbid = 0);
00118
00122 int numberOfNodeSplits() const { return m_nodeSplits; }
00123
00124 int numberOfSplittedNodes() const { return m_splittedNodes; }
00125
00126 protected:
00142 virtual ReturnType doCall(PlanRepExpansion &PG,
00143 int cc,
00144 const EdgeArray<bool> *forbid,
00145 int& crossingNumber,
00146 int& numNS,
00147 int& numSN) = 0;
00148
00149 private:
00150 int m_nodeSplits;
00151 int m_splittedNodes;
00152
00153 OGDF_MALLOC_NEW_DELETE
00154 };
00155
00156 }
00157
00158 #endif