Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
BarycenterHeuristic.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 BarycenterHeuristic(*this); }
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.
The barycenter heuristic for 2-layer crossing minimization.
virtual LayerByLayerSweep * clone() const override
Returns a new instance of the barycenter heuristic with the same option settings.
virtual void call(Level &L) override
Calls the barycenter heuristic for level L.
BarycenterHeuristic(const BarycenterHeuristic &crossMin)
Creates a new instance of the barycenter heuristic.
NodeArray< double > m_weight
The barycenter weight of the nodes.
virtual void init(const HierarchyLevels &levels) override
Initializes crossing minimization for hierarchy H.
virtual void cleanup() override
Does some clean-up after calls.
BarycenterHeuristic()
Creates a new instance of the barycenter heuristic.
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
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.