Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

MMCrossingMinimizationModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <ogdf/basic/Module.h>
37 #include <ogdf/basic/Logger.h>
38 
39 
40 namespace ogdf {
41 
47 {
48 public:
50  MMCrossingMinimizationModule() : m_nodeSplits(0), m_splittedNodes(0) { }
51 
52  // destruction
54 
71  int cc,
72  int& crossingNumber,
73  const EdgeArray<bool> *forbid = nullptr)
74  {
75  return doCall(PG, cc, forbid, crossingNumber, m_nodeSplits, m_splittedNodes);
76  };
77 
88  ReturnType call(const Graph &G, int &cr, const EdgeArray<bool> *forbid = nullptr);
89 
101  ReturnType call(const Graph &G,
102  const List<node> &splittableNodes,
103  int &cr,
104  const EdgeArray<bool> *forbid = nullptr);
105 
109  int numberOfNodeSplits() const { return m_nodeSplits; }
110 
111  int numberOfSplittedNodes() const { return m_splittedNodes; }
112 
113 protected:
129  virtual ReturnType doCall(PlanRepExpansion &PG,
130  int cc,
131  const EdgeArray<bool> *forbid,
132  int& crossingNumber,
133  int& numNS,
134  int& numSN) = 0;
135 
136 private:
139 
141 };
142 
143 } // end namespace ogdf
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
Planarized representations (of a connected component) of a graph.
int numberOfNodeSplits() const
Returns the number of required node splits after the call.
Declares base class for all module types.
Base class for modules.
Definition: Module.h:47
int m_splittedNodes
The number of nodes that are split.
ReturnType
The return type of a module.
Definition: Module.h:51
ReturnType call(PlanRepExpansion &PG, int cc, int &crossingNumber, const EdgeArray< bool > *forbid=nullptr)
Computes a planarized representation of an expansion of the input graph.
int m_nodeSplits
The number of required node splits.
Declaration of class PlanRepExpansion representing a planarized representation of the expansion of a ...
Contains logging functionality.
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
The namespace for all OGDF objects.
Interface for minor-monotone crossing minimization algorithms.
MMCrossingMinimizationModule()
Initializes a minor-monotone crossing minimization module.