Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

GridSifting.h
Go to the documentation of this file.
1 
32 #pragma once
33 
37 
38 
39 namespace ogdf {
40 
54 
55 
56 public:
58  GlobalSifting() : m_nRepeats(10) { }
59 
67  int nRepeats() { return m_nRepeats; }
68 
70  void nRepeats( int num ) { m_nRepeats = num; }
71 
73  const HierarchyLevelsBase *reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings)
74  {
75  BlockOrder *pBlockOrder = new BlockOrder(H,true);
76 
77  pBlockOrder -> globalSifting( sugi.runs(), m_nRepeats, &nCrossings );
78 
79  return pBlockOrder;
80  }
81 
82 private:
84 };
85 
103 
104 public:
107 
110  {
111  BlockOrder *pBlockOrder = new BlockOrder(H,false);
112 
113  pBlockOrder -> m_verticalStepsBound = 10;
114 
115  pBlockOrder -> gridSifting( sugi.runs() );
116 
117  return pBlockOrder;
118  }
119 
126  int verticalStepsBound() { return m_verticalStepsBound; }
127 
129  void verticalStepsBound( int b ) { m_verticalStepsBound = b; }
130 
131 private:
133 };
134 
135 
136 } // end namespace ogdf
int runs() const
Returns the current setting of option runs.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Hierarchical graph representation used by GlobalSifting and GridSifting algorithms.
Definition: BlockOrder.h:125
int nRepeats()
Returns the current setting of option nRepeats.
Definition: GridSifting.h:67
GridSifting()
Creates a new instance of the global sifting heuristic.
Definition: GridSifting.h:106
int verticalStepsBound()
Returns the current setting of option verticalStepsBound.
Definition: GridSifting.h:126
Interface of crossing minimization algorithms for layered graphs.
void nRepeats(int num)
Sets the option nRepeats to num.
Definition: GridSifting.h:70
Sugiyama's layout algorithm.
Declaration of Sugiyama algorithm.
Declaration of BlockOrder and related classes.
Declaration of interface for two-layer crossing minimization algorithms.
const HierarchyLevelsBase * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H)
implementation of interface LayeredCrossMinModule.
Definition: GridSifting.h:109
GlobalSifting()
Creates a new instance of the global sifting heuristic.
Definition: GridSifting.h:58
const HierarchyLevelsBase * reduceCrossings(const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings)
Implementation of interface LateredCrossMinModule.
Definition: GridSifting.h:73
The namespace for all OGDF objects.
void verticalStepsBound(int b)
Sets the option verticalStepsBound to b.
Definition: GridSifting.h:129
The global sifting heuristic for crossing minimization.
Definition: GridSifting.h:53
The grid sifting heuristic for crossing minimization.
Definition: GridSifting.h:102
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:44