Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

MedianHeuristic.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 
37 namespace ogdf {
38 
39 
41 
45 {
46 public:
49 
51  MedianHeuristic(const MedianHeuristic &crossMin) { }
52 
54  virtual LayerByLayerSweep *clone() const override
55  {
56  return new MedianHeuristic;
57  }
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 
73 } // end namespace ogdf
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.