Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

LayerByLayerSweep.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/layered/Hierarchy.h>
38 
39 namespace ogdf {
40 
41 class SugiyamaLayout;
42 
59 public:
60 
61  virtual const HierarchyLevels *reduceCrossings(const SugiyamaLayout &sugi, const Hierarchy &H, int &nCrossings);
62 
64  virtual const HierarchyLevels *reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
65  {
66  const Hierarchy &constH = H;
67  return reduceCrossings( sugi, constH, nCrossings );
68  }
69 
72 
73  virtual ~LayerByLayerSweep() { }
74 
76  virtual LayerByLayerSweep *clone() const = 0;
77 
83  virtual void init(const HierarchyLevels &levels) { }
84 
91  virtual void call(Level &L) = 0;
92 
99  void operator()(Level &L) {
100  call(L);
101  }
102 
104  virtual void cleanup() override { }
105 
106 
107  class CrossMinMaster;
108  class CrossMinWorker;
109 
111 };
112 
113 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
HierarchyLevels.h
Declaration of HierarchyLevels class.
ogdf::Hierarchy
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:44
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
LayeredCrossMinModule.h
Declaration of interface for two-layer crossing minimization algorithms.
ogdf::LayerByLayerSweep::~LayerByLayerSweep
virtual ~LayerByLayerSweep()
Definition: LayerByLayerSweep.h:73
ogdf::LayerByLayerSweep::LayerByLayerSweep
LayerByLayerSweep()
Initializes a two-layer crossing minimization module.
Definition: LayerByLayerSweep.h:71
ogdf::SugiyamaLayout
Sugiyama's layout algorithm.
Definition: SugiyamaLayout.h:159
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
ogdf::LayerByLayerSweep::init
virtual void init(const HierarchyLevels &levels)
Initializes the crossing minimization module for hierarchy levels levels.
Definition: LayerByLayerSweep.h:83
Hierarchy.h
Declaration of Hierarchy class.
ogdf::LayerByLayerSweep::reduceCrossings
virtual const HierarchyLevels * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
Template method implementation of reduceCrossings from LayeredCrossMinModule.
Definition: LayerByLayerSweep.h:64
ogdf::Level
Representation of levels in hierarchies.
Definition: Level.h:61
ogdf::LayeredCrossMinModule
Interface of crossing minimization algorithms for layered graphs.
Definition: LayeredCrossMinModule.h:54
ogdf::LayerByLayerSweep
Interface of two-layer crossing minimization algorithms.
Definition: LayerByLayerSweep.h:58
ogdf::LayerByLayerSweep::operator()
void operator()(Level &L)
Performs crossing minimization for level L.
Definition: LayerByLayerSweep.h:99
ogdf::LayerByLayerSweep::cleanup
virtual void cleanup() override
Performs clean-up.
Definition: LayerByLayerSweep.h:104
ogdf::HierarchyLevels
Representation of proper hierarchies used by Sugiyama-layout.
Definition: HierarchyLevels.h:46