Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
LayerByLayerSweep.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/basic.h>
36#include <ogdf/basic/memory.h>
39
40namespace ogdf {
41
42class Hierarchy;
43class Level;
44class SugiyamaLayout;
45
62public:
63 virtual const HierarchyLevels* reduceCrossings(const SugiyamaLayout& sugi, const Hierarchy& H,
64 int& nCrossings);
65
68 int& nCrossings) override {
69 const Hierarchy& constH = H;
70 return reduceCrossings(sugi, constH, nCrossings);
71 }
72
75
76 virtual ~LayerByLayerSweep() { }
77
79 virtual LayerByLayerSweep* clone() const = 0;
80
86 virtual void init(const HierarchyLevels& levels) { }
87
94 virtual void call(Level& L) = 0;
95
102 void operator()(Level& L) { call(L); }
103
105 virtual void cleanup() override { }
106
107
108 class CrossMinMaster;
109 class CrossMinWorker;
110
112};
113
114}
Declaration of HierarchyLevels class.
Declaration of interface for two-layer crossing minimization algorithms.
Basic declarations, included by all source files.
Representation of proper hierarchies used by Sugiyama-layout.
Definition Hierarchy.h:47
Representation of proper hierarchies used by Sugiyama-layout.
Interface of two-layer crossing minimization algorithms.
virtual void call(Level &L)=0
Performs crossing minimization for level L.
virtual void cleanup() override
Performs clean-up.
virtual const HierarchyLevels * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
Template method implementation of reduceCrossings from LayeredCrossMinModule.
virtual LayerByLayerSweep * clone() const =0
Returns a new instance of the two-layer crossing minimization module with the same option settings.
LayerByLayerSweep()
Initializes a two-layer crossing minimization module.
virtual void init(const HierarchyLevels &levels)
Initializes the crossing minimization module for hierarchy levels levels.
virtual const HierarchyLevels * reduceCrossings(const SugiyamaLayout &sugi, const Hierarchy &H, int &nCrossings)
void operator()(Level &L)
Performs crossing minimization for level L.
Interface of crossing minimization algorithms for layered graphs.
Representation of levels in hierarchies.
Definition Level.h:66
Sugiyama's layout algorithm.
#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.