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
34#include <ogdf/basic/Array.h>
35#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/basic.h>
38#include <ogdf/basic/geometry.h>
44
45#include <algorithm>
46#include <memory>
47
48namespace ogdf {
49class GraphAttributes;
50class Layout;
51class PlanRep;
52template<class E>
53class List;
54
56
60public:
63
66
69
73 void call(GraphAttributes& ga) override;
74
76
82 void call(GraphAttributes& ga, Graph& g);
83
85
92
96 double pageRatio() const { return m_pageRatio; }
97
99 void pageRatio(double ratio) { m_pageRatio = ratio; }
100
102
106 int minCliqueSize() const { return m_cliqueSize; }
107
109 void minCliqueSize(int i) { m_cliqueSize = max(i, 3); }
110
117 void setCrossMin(CrossingMinimizationModule* pCrossMin) { m_crossMin.reset(pCrossMin); }
118
120
125 void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
126
128
136 void setPlanarLayouter(LayoutPlanRepModule* pPlanarLayouter) {
137 m_planarLayouter.reset(pPlanarLayouter);
138 }
139
141
146 void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
147
154 int numberOfCrossings() const { return m_nCrossings; }
155
157
158private:
160
161 void arrangeCCs(PlanRep& PG, GraphAttributes& GA, Array<DPoint>& boundingBox) const;
162 void preprocessCliques(Graph& G, CliqueReplacer& cliqueReplacer);
163 void fillAdjNodes(List<node>& adjNodes, PlanRep& PG, node centerNode, NodeArray<bool>& isClique,
164 Layout& drawing);
165
167 std::unique_ptr<CrossingMinimizationModule> m_crossMin;
168
170 std::unique_ptr<EmbedderModule> m_embedder;
171
173 std::unique_ptr<LayoutPlanRepModule> m_planarLayouter;
174
176 std::unique_ptr<CCLayoutPackModule> m_packer;
177
178 double m_pageRatio;
180
182};
183
184}
Declaration and implementation of Array class and Array algorithms.
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.
Includes declaration of graph class.
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of interface for planar layout algorithms (used in planarization approach).
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
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:866
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:49
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:1451
Class for the representation of nodes.
Definition Graph_d.h:241
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
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)
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#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.