Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MedianHeuristic.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37
39
43public:
46
49
51 virtual LayerByLayerSweep* clone() const override { return new MedianHeuristic; }
52
54 virtual void init(const HierarchyLevels& levels) override { m_weight.init(levels.hierarchy()); }
55
57 virtual void call(Level& L) override;
58
60 virtual void cleanup() override { m_weight.init(); }
61
62private:
64};
65
66}
Declaration of interface for two-layer crossing minimization algorithms.
Representation of proper hierarchies used by Sugiyama-layout.
const Hierarchy & hierarchy() const override
Interface of two-layer crossing minimization algorithms.
Representation of levels in hierarchies.
Definition Level.h:60
The median heuristic for 2-layer crossing minimization.
virtual void call(Level &L) override
Calls the median heuristic for level L.
MedianHeuristic()
Creates a new instance of the median heuristic.
virtual void cleanup() override
Does some clean-up after calls.
virtual LayerByLayerSweep * clone() const override
Returns a new instance of the median heuristic with the same option settings.
virtual void init(const HierarchyLevels &levels) override
Initializes crossing minimization for hierarchy H.
NodeArray< int > m_weight
The median weight of a node.
MedianHeuristic(const MedianHeuristic &crossMin)
Creates a new instance of the median heuristic.
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.