Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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