Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

MMCrossingMinimizationModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/Module.h>
37 #include <ogdf/basic/basic.h>
38 #include <ogdf/basic/memory.h>
39 
40 namespace ogdf {
41 class PlanRepExpansion;
42 template<class E>
43 class List;
44 
50 public:
52  MMCrossingMinimizationModule() : m_nodeSplits(0), m_splittedNodes(0) { }
53 
54  // destruction
56 
72  ReturnType call(PlanRepExpansion& PG, int cc, int& crossingNumber,
73  const EdgeArray<bool>* forbid = nullptr) {
74  return doCall(PG, cc, forbid, crossingNumber, m_nodeSplits, m_splittedNodes);
75  };
76 
87  ReturnType call(const Graph& G, int& cr, const EdgeArray<bool>* forbid = nullptr);
88 
100  ReturnType call(const Graph& G, const List<node>& splittableNodes, int& cr,
101  const EdgeArray<bool>* forbid = nullptr);
102 
106  int numberOfNodeSplits() const { return m_nodeSplits; }
107 
108  int numberOfSplittedNodes() const { return m_splittedNodes; }
109 
110 protected:
126  virtual ReturnType doCall(PlanRepExpansion& PG, int cc, const EdgeArray<bool>* forbid,
127  int& crossingNumber, int& numNS, int& numSN) = 0;
128 
129 private:
132 
134 };
135 
136 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::MMCrossingMinimizationModule::m_nodeSplits
int m_nodeSplits
The number of required node splits.
Definition: MMCrossingMinimizationModule.h:130
Graph.h
Includes declaration of graph class.
ogdf::MMCrossingMinimizationModule::numberOfSplittedNodes
int numberOfSplittedNodes() const
Definition: MMCrossingMinimizationModule.h:108
ogdf::PlanRepExpansion
Planarized representations (of a connected component) of a graph.
Definition: PlanRepExpansion.h:58
ogdf::MMCrossingMinimizationModule
Interface for minor-monotone crossing minimization algorithms.
Definition: MMCrossingMinimizationModule.h:49
ogdf::MMCrossingMinimizationModule::call
ReturnType call(PlanRepExpansion &PG, int cc, int &crossingNumber, const EdgeArray< bool > *forbid=nullptr)
Computes a planarized representation of an expansion of the input graph.
Definition: MMCrossingMinimizationModule.h:72
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::Module
Base class for modules.
Definition: Module.h:49
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::MMCrossingMinimizationModule::m_splittedNodes
int m_splittedNodes
The number of nodes that are split.
Definition: MMCrossingMinimizationModule.h:131
ogdf::MMCrossingMinimizationModule::MMCrossingMinimizationModule
MMCrossingMinimizationModule()
Initializes a minor-monotone crossing minimization module.
Definition: MMCrossingMinimizationModule.h:52
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::MMCrossingMinimizationModule::numberOfNodeSplits
int numberOfNodeSplits() const
Returns the number of required node splits after the call.
Definition: MMCrossingMinimizationModule.h:106
Module.h
Declares base class for all module types.
ogdf::MMCrossingMinimizationModule::~MMCrossingMinimizationModule
virtual ~MMCrossingMinimizationModule()
Definition: MMCrossingMinimizationModule.h:55
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716