Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
40namespace ogdf {
41class PlanRepExpansion;
42template<class E>
43class List;
44
50public:
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
110protected:
126 virtual ReturnType doCall(PlanRepExpansion& PG, int cc, const EdgeArray<bool>* forbid,
127 int& crossingNumber, int& numNS, int& numSN) = 0;
128
129private:
132
134};
135
136}
Includes declaration of graph class.
Declares base class for all module types.
Basic declarations, included by all source files.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Interface for minor-monotone crossing minimization algorithms.
int numberOfNodeSplits() const
Returns the number of required node splits after the call.
ReturnType call(const Graph &G, const List< node > &splittableNodes, int &cr, const EdgeArray< bool > *forbid=nullptr)
Performs minor-monotone crossing minimization on G for given splittable nodes.
int m_splittedNodes
The number of nodes that are split.
int m_nodeSplits
The number of required node splits.
virtual ReturnType doCall(PlanRepExpansion &PG, int cc, const EdgeArray< bool > *forbid, int &crossingNumber, int &numNS, int &numSN)=0
Actual algorithm call that needs to be implemented by derived classed.
ReturnType call(const Graph &G, int &cr, const EdgeArray< bool > *forbid=nullptr)
Performs minor-monotone crossing minimization on G.
MMCrossingMinimizationModule()
Initializes a minor-monotone crossing minimization module.
ReturnType call(PlanRepExpansion &PG, int cc, int &crossingNumber, const EdgeArray< bool > *forbid=nullptr)
Computes a planarized representation of an expansion of the input graph.
Base class for modules.
Definition Module.h:49
ReturnType
The return type of a module.
Definition Module.h:52
Planarized representations (of a connected component) of a graph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:92
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.