Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

BarycenterHeuristic.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 
52 
54  virtual LayerByLayerSweep *clone() const override
55  {
56  return new BarycenterHeuristic(*this);
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.
virtual void cleanup() override
Does some clean-up after calls.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
virtual void init(const HierarchyLevels &levels) override
Initializes crossing minimization for hierarchy H.
Declaration of interface for two-layer crossing minimization algorithms.
Representation of levels in hierarchies.
Definition: Level.h:61
BarycenterHeuristic()
Creates a new instance of the barycenter heuristic.
NodeArray< double > m_weight
The barycenter weight of the nodes.
const Hierarchy & hierarchy() const override
Interface of two-layer crossing minimization algorithms.
The namespace for all OGDF objects.
The barycenter heuristic for 2-layer crossing minimization.
BarycenterHeuristic(const BarycenterHeuristic &crossMin)
Creates a new instance of the barycenter heuristic.
virtual LayerByLayerSweep * clone() const override
Returns a new instance of the barycenter heuristic with the same option settings. ...