Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

BarycenterHeuristic.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
39 
43 {
44 public:
47 
50 
52  virtual LayerByLayerSweep *clone() const override
53  {
54  return new BarycenterHeuristic(*this);
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.
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. ...