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
34#include <ogdf/basic/Graph.h>
36#include <ogdf/basic/basic.h>
40
41namespace ogdf {
42class Level;
43
45
49public:
52
54 MedianHeuristic(const MedianHeuristic& crossMin) { }
55
57 virtual LayerByLayerSweep* clone() const override { return new MedianHeuristic; }
58
60 virtual void init(const HierarchyLevels& levels) override { m_weight.init(levels.hierarchy()); }
61
63 virtual void call(Level& L) override;
64
66 virtual void cleanup() override { m_weight.init(); }
67
68private:
70};
71
72}
Includes declaration of graph class.
Declaration of graph copy classes.
Declaration of Hierarchy class.
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.
const Hierarchy & hierarchy() const override
Interface of two-layer crossing minimization algorithms.
Representation of levels in hierarchies.
Definition Level.h:66
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.
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.