Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

MedianHeuristic.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/GraphCopy.h>
36 #include <ogdf/basic/basic.h>
37 #include <ogdf/layered/Hierarchy.h>
40 
41 namespace ogdf {
42 class Level;
43 
45 
49 public:
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 
68 private:
70 };
71 
72 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::MedianHeuristic
The median heuristic for 2-layer crossing minimization.
Definition: MedianHeuristic.h:48
ogdf::MedianHeuristic::m_weight
NodeArray< int > m_weight
The median weight of a node.
Definition: MedianHeuristic.h:69
ogdf::MedianHeuristic::MedianHeuristic
MedianHeuristic()
Creates a new instance of the median heuristic.
Definition: MedianHeuristic.h:51
HierarchyLevels.h
Declaration of HierarchyLevels class.
ogdf::MedianHeuristic::cleanup
virtual void cleanup() override
Does some clean-up after calls.
Definition: MedianHeuristic.h:66
LayerByLayerSweep.h
Declaration of interface for two-layer crossing minimization algorithms.
GraphCopy.h
Declaration of graph copy classes.
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::HierarchyLevels::hierarchy
const Hierarchy & hierarchy() const override
Definition: HierarchyLevels.h:73
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::MedianHeuristic::init
virtual void init(const HierarchyLevels &levels) override
Initializes crossing minimization for hierarchy H.
Definition: MedianHeuristic.h:60
Hierarchy.h
Declaration of Hierarchy class.
ogdf::Level
Representation of levels in hierarchies.
Definition: Level.h:66
ogdf::LayerByLayerSweep
Interface of two-layer crossing minimization algorithms.
Definition: LayerByLayerSweep.h:61
ogdf::MedianHeuristic::clone
virtual LayerByLayerSweep * clone() const override
Returns a new instance of the median heuristic with the same option settings.
Definition: MedianHeuristic.h:57
ogdf::MedianHeuristic::MedianHeuristic
MedianHeuristic(const MedianHeuristic &crossMin)
Creates a new instance of the median heuristic.
Definition: MedianHeuristic.h:54
ogdf::HierarchyLevels
Representation of proper hierarchies used by Sugiyama-layout.
Definition: HierarchyLevels.h:51