Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LayerByLayerSweep.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/basic.h>
36 #include <ogdf/basic/memory.h>
39 
40 namespace ogdf {
41 
42 class Hierarchy;
43 class Level;
44 class SugiyamaLayout;
45 
62 public:
63  virtual const HierarchyLevels* reduceCrossings(const SugiyamaLayout& sugi, const Hierarchy& H,
64  int& nCrossings);
65 
67  virtual const HierarchyLevels* reduceCrossings(const SugiyamaLayout& sugi, Hierarchy& H,
68  int& nCrossings) override {
69  const Hierarchy& constH = H;
70  return reduceCrossings(sugi, constH, nCrossings);
71  }
72 
75 
76  virtual ~LayerByLayerSweep() { }
77 
79  virtual LayerByLayerSweep* clone() const = 0;
80 
86  virtual void init(const HierarchyLevels& levels) { }
87 
94  virtual void call(Level& L) = 0;
95 
102  void operator()(Level& L) { call(L); }
103 
105  virtual void cleanup() override { }
106 
107 
108  class CrossMinMaster;
109  class CrossMinWorker;
110 
112 };
113 
114 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
HierarchyLevels.h
Declaration of HierarchyLevels class.
ogdf::Hierarchy
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:47
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
LayeredCrossMinModule.h
Declaration of interface for two-layer crossing minimization algorithms.
ogdf::LayerByLayerSweep::~LayerByLayerSweep
virtual ~LayerByLayerSweep()
Definition: LayerByLayerSweep.h:76
ogdf::LayerByLayerSweep::LayerByLayerSweep
LayerByLayerSweep()
Initializes a two-layer crossing minimization module.
Definition: LayerByLayerSweep.h:74
ogdf::SugiyamaLayout
Sugiyama's layout algorithm.
Definition: SugiyamaLayout.h:168
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::LayerByLayerSweep::init
virtual void init(const HierarchyLevels &levels)
Initializes the crossing minimization module for hierarchy levels levels.
Definition: LayerByLayerSweep.h:86
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:67
ogdf::Level
Representation of levels in hierarchies.
Definition: Level.h:66
ogdf::LayeredCrossMinModule
Interface of crossing minimization algorithms for layered graphs.
Definition: LayeredCrossMinModule.h:56
ogdf::LayerByLayerSweep
Interface of two-layer crossing minimization algorithms.
Definition: LayerByLayerSweep.h:61
ogdf::LayerByLayerSweep::operator()
void operator()(Level &L)
Performs crossing minimization for level L.
Definition: LayerByLayerSweep.h:102
ogdf::LayerByLayerSweep::cleanup
virtual void cleanup() override
Performs clean-up.
Definition: LayerByLayerSweep.h:105
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::HierarchyLevels
Representation of proper hierarchies used by Sugiyama-layout.
Definition: HierarchyLevels.h:51