Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarizationGridLayout.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/basic.h>
35#include <ogdf/basic/geometry.h>
39
40#include <memory>
41
42namespace ogdf {
43class Graph;
44class GridLayout;
45
97public:
100
102
114 double pageRatio() const { return m_pageRatio; }
115
117 void pageRatio(double ratio) { m_pageRatio = ratio; }
118
125 void setCrossMin(CrossingMinimizationModule* pCrossMin) { m_crossMin.reset(pCrossMin); }
126
138 m_planarLayouter.reset(pPlanarLayouter);
139 }
140
148 void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
149
156 int numberOfCrossings() const { return m_nCrossings; }
157
159
160protected:
161 virtual void doCall(const Graph& G, GridLayout& gridLayout, IPoint& boundingBox) override;
162
163
164private:
166 std::unique_ptr<CrossingMinimizationModule> m_crossMin;
167
169 std::unique_ptr<GridLayoutPlanRepModule> m_planarLayouter;
170
172 std::unique_ptr<CCLayoutPackModule> m_packer;
173
174 double m_pageRatio;
175
177};
178
179}
Declaration of interface for algorithms that arrange/pack layouts of connected components.
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
Declaration of interface for grid layout algorithms.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Base class of algorithms that arrange/pack layouts of connected components.
Base class for crossing minimization algorithms.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Representation of a graph's grid layout.
Definition GridLayout.h:47
Base class for grid layout algorithms.
Base class for grid layout algorithms operating on a PlanRep.
The planarization grid layout algorithm.
void setPlanarLayouter(GridLayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar grid layout algorithm.
std::unique_ptr< GridLayoutPlanRepModule > m_planarLayouter
The module for computing a planar grid layout.
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
virtual void doCall(const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override
Implements the algorithm call.
double m_pageRatio
The desired page ratio.
double pageRatio() const
Returns the current setting of option pageRatio.
PlanarizationGridLayout()
Creates an instance of planarization layout and sets options to default values.
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
int numberOfCrossings() const
Returns the number of crossings in computed layout.
int m_nCrossings
The number of crossings in the computed layout.
void setCrossMin(CrossingMinimizationModule *pCrossMin)
Sets the module option for crossing minimization.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.