Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

GridSifting.h
Go to the documentation of this file.
1 
32 #pragma once
33 
37 
38 namespace ogdf {
39 class Hierarchy;
40 class HierarchyLevelsBase;
41 
55 public:
63  int nRepeats() { return m_nRepeats; }
64 
66  void nRepeats(int num) { m_nRepeats = num; }
67 
70  int& nCrossings) {
71  BlockOrder* pBlockOrder = new BlockOrder(H, true);
72  pBlockOrder->globalSifting(sugi.runs(), m_nRepeats, &nCrossings);
73 
74  return pBlockOrder;
75  }
76 
77 private:
78  int m_nRepeats = 10;
79 };
80 
95 public:
102  int& nCrossings) override {
103  BlockOrder* pBlockOrder = new BlockOrder(H, false);
105  pBlockOrder->gridSifting(sugi.runs());
106 
107  return pBlockOrder;
108  }
109 
117 
120 
121 private:
123 };
124 
125 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
BlockOrder.h
Declaration of BlockOrder and related classes.
ogdf::GlobalSifting::nRepeats
int nRepeats()
Returns the current setting of option nRepeats.
Definition: GridSifting.h:63
ogdf::GlobalSifting::reduceCrossings
const HierarchyLevelsBase * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings)
Implementation of interface LateredCrossMinModule.
Definition: GridSifting.h:69
ogdf::BlockOrder::globalSifting
void globalSifting(int rho=1, int nRepeats=10, int *pNumCrossings=nullptr)
Calls the global sifting algorithm on graph (its hierarchy).
ogdf::GridSifting::reduceCrossings
const HierarchyLevelsBase * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
Calls the actual crossing minimization algorithm.
Definition: GridSifting.h:101
ogdf::Hierarchy
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:47
ogdf::SugiyamaLayout::runs
int runs() const
Returns the current setting of option runs.
Definition: SugiyamaLayout.h:274
ogdf::HierarchyLevelsBase
Definition: CrossingMinInterfaces.h:63
ogdf::GlobalSifting::m_nRepeats
int m_nRepeats
Definition: GridSifting.h:78
ogdf::GridSifting::verticalStepsBound
int verticalStepsBound()
Returns the current setting of option verticalStepsBound.
Definition: GridSifting.h:116
ogdf::GridSifting::verticalStepsBound
void verticalStepsBound(int b)
Sets the option verticalStepsBound to b.
Definition: GridSifting.h:119
LayeredCrossMinModule.h
Declaration of interface for two-layer crossing minimization algorithms.
ogdf::GridSifting
The grid sifting heuristic for crossing minimization.
Definition: GridSifting.h:94
ogdf::GridSifting::m_verticalStepsBound
int m_verticalStepsBound
Definition: GridSifting.h:122
ogdf::GlobalSifting::nRepeats
void nRepeats(int num)
Sets the option nRepeats to num.
Definition: GridSifting.h:66
ogdf::SugiyamaLayout
Sugiyama's layout algorithm.
Definition: SugiyamaLayout.h:168
ogdf::BlockOrder::m_verticalStepsBound
int m_verticalStepsBound
Definition: BlockOrder.h:302
ogdf::BlockOrder
Hierarchical graph representation used by GlobalSifting and GridSifting algorithms.
Definition: BlockOrder.h:120
ogdf::LayeredCrossMinModule
Interface of crossing minimization algorithms for layered graphs.
Definition: LayeredCrossMinModule.h:56
ogdf::GlobalSifting
The global sifting heuristic for crossing minimization.
Definition: GridSifting.h:54
SugiyamaLayout.h
Declaration of Sugiyama algorithm.
ogdf::BlockOrder::gridSifting
void gridSifting(int nRepeats=10)
Calls the grid sifting algorithm on a graph (its hierarchy).