Open
Graph Drawing
Framework

 v.2012.07
 

MMCrossingMinimizationModule.h
Go to the documentation of this file.
1 /*
2  * $Revision: 2523 $
3  *
4  * last checkin:
5  * $Author: gutwenger $
6  * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7  ***************************************************************/
8 
44 #ifndef OGDF_MM_CROSSING_MINIMIZATION_MODULE_H
45 #define OGDF_MM_CROSSING_MINIMIZATION_MODULE_H
46 
47 
48 
50 #include <ogdf/basic/Module.h>
51 #include <ogdf/basic/Logger.h>
52 
53 
54 namespace ogdf {
55 
61 {
62 public:
64  MMCrossingMinimizationModule() { m_nodeSplits = 0; }
65 
66  // destruction
68 
85  int cc,
86  int& crossingNumber,
87  const EdgeArray<bool> *forbid = 0)
88  {
89  return doCall(PG, cc, forbid, crossingNumber, m_nodeSplits, m_splittedNodes);
90  };
91 
102  ReturnType call(const Graph &G, int &cr, const EdgeArray<bool> *forbid = 0);
103 
115  ReturnType call(const Graph &G,
116  const List<node> &splittableNodes,
117  int &cr,
118  const EdgeArray<bool> *forbid = 0);
119 
123  int numberOfNodeSplits() const { return m_nodeSplits; }
124 
125  int numberOfSplittedNodes() const { return m_splittedNodes; }
126 
127 protected:
143  virtual ReturnType doCall(PlanRepExpansion &PG,
144  int cc,
145  const EdgeArray<bool> *forbid,
146  int& crossingNumber,
147  int& numNS,
148  int& numSN) = 0;
149 
150 private:
153 
155 };
156 
157 } // end namespace ogdf
158 
159 #endif