Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarizationLayout.h
Go to the documentation of this file.
1
32#pragma once
33
40
41#include <memory>
42
43namespace ogdf {
44
46
50public:
53
56
59
63 void call(GraphAttributes& ga) override;
64
66
72 void call(GraphAttributes& ga, Graph& g);
73
75
82
86 double pageRatio() const { return m_pageRatio; }
87
89 void pageRatio(double ratio) { m_pageRatio = ratio; }
90
92
96 int minCliqueSize() const { return m_cliqueSize; }
97
99 void minCliqueSize(int i) { m_cliqueSize = max(i, 3); }
100
108
110
115 void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
116
118
127 m_planarLayouter.reset(pPlanarLayouter);
128 }
129
131
136 void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
137
144 int numberOfCrossings() const { return m_nCrossings; }
145
147
148private:
150
151 void arrangeCCs(PlanRep& PG, GraphAttributes& GA, Array<DPoint>& boundingBox) const;
154 Layout& drawing);
155
157 std::unique_ptr<CrossingMinimizationModule> m_crossMin;
158
160 std::unique_ptr<EmbedderModule> m_embedder;
161
163 std::unique_ptr<LayoutPlanRepModule> m_planarLayouter;
164
166 std::unique_ptr<CCLayoutPackModule> m_packer;
167
168 double m_pageRatio;
170
172};
173
174}
Declaration of interface for algorithms that arrange/pack layouts of connected components.
Handling of clique replacement in planarization layout.
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
Defines ogdf::EmbedderModule.
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of interface for planar layout algorithms (used in planarization approach).
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
Base class of algorithms that arrange/pack layouts of connected components.
Base class for crossing minimization algorithms.
Base class for embedder algorithms.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:46
Interface of general layout algorithms.
Interface for planar layout algorithms (used in the planarization approach).
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
The planarization approach for drawing graphs.
double pageRatio() const
Returns the current setting of option pageRatio.
int minCliqueSize() const
Returns the current setting of option minCliqueSize.
void callSimDraw(GraphAttributes &ga)
int m_nCrossings
The number of crossings in the computed layout.
void minCliqueSize(int i)
Set the option minCliqueSize to i.
int m_cliqueSize
The minimum size of cliques to search for.
PlanarizationLayout()
Creates an instance of planarization layout and sets options to default values.
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
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.
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
void setPlanarLayouter(LayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm.
std::unique_ptr< EmbedderModule > m_embedder
The module for planar embedding.
void call(GraphAttributes &ga, Graph &g)
Calls planarization layout with clique handling for GraphAttributes ga with associated graph g.
void call(GraphAttributes &ga) override
Calls planarization layout for GraphAttributes ga.
double m_pageRatio
The desired page ratio.
int numberOfCrossings() const
Returns the number of crossings in the computed layout.
void preprocessCliques(Graph &G, CliqueReplacer &cliqueReplacer)
std::unique_ptr< LayoutPlanRepModule > m_planarLayouter
The module for computing a planar layout.
void setCrossMin(CrossingMinimizationModule *pCrossMin)
Sets the module option for crossing minimization.
void arrangeCCs(PlanRep &PG, GraphAttributes &GA, Array< DPoint > &boundingBox) const
void fillAdjNodes(List< node > &adjNodes, PlanRep &PG, node centerNode, NodeArray< bool > &isClique, Layout &drawing)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.