Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

LayerByLayerSweep.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/layered/Hierarchy.h>
38 namespace ogdf {
39 
40 class SugiyamaLayout;
41 
58 public:
59 
60  virtual const HierarchyLevels *reduceCrossings(const SugiyamaLayout &sugi, const Hierarchy &H, int &nCrossings);
61 
63  virtual const HierarchyLevels *reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
64  {
65  const Hierarchy &constH = H;
66  return reduceCrossings( sugi, constH, nCrossings );
67  }
68 
71 
72  virtual ~LayerByLayerSweep() { }
73 
75  virtual LayerByLayerSweep *clone() const = 0;
76 
82  virtual void init(const HierarchyLevels &levels) { }
83 
90  virtual void call(Level &L) = 0;
91 
98  void operator()(Level &L) {
99  call(L);
100  }
101 
103  virtual void cleanup() override { }
104 
105 
106  class CrossMinMaster;
107  class CrossMinWorker;
108 
110 };
111 
112 
113 } // end namespace ogdf
virtual const HierarchyLevels * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
Template method implementation of reduceCrossings from LayeredCrossMinModule.
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
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
Declaration of HierarchyLevels class.
Representation of levels in hierarchies.
Definition: Level.h:61
Declaration of Hierarchy class.
Interface of crossing minimization algorithms for layered graphs.
Sugiyama&#39;s layout algorithm.
void operator()(Level &L)
Performs crossing minimization for level L.
Declaration of interface for two-layer crossing minimization algorithms.
LayerByLayerSweep()
Initializes a two-layer crossing minimization module.
virtual void cleanup() override
Performs clean-up.
virtual void init(const HierarchyLevels &levels)
Initializes the crossing minimization module for hierarchy levels levels.
Interface of two-layer crossing minimization algorithms.
The namespace for all OGDF objects.
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:44