Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ClusterPlanarizationLayout.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/basic.h>
40
41#include <memory>
42
43namespace ogdf {
44class ClusterGraph;
45class ClusterGraphAttributes;
46class ClusterPlanRep;
47class Layout;
48
50
89public:
92
95
97
103 virtual void call(Graph& G, ClusterGraphAttributes& acGraph, ClusterGraph& cGraph,
104 bool simpleCConnect = true);
106
113 virtual void call(Graph& G, ClusterGraphAttributes& acGraph, ClusterGraph& cGraph,
114 EdgeArray<double>& edgeWeight, bool simpleCConnect = true);
115
117 double pageRatio() const { return m_pageRatio; }
118
120 void pageRatio(double ratio) { m_pageRatio = ratio; }
121
124 m_planarLayouter.reset(pPlanarLayouter);
125 }
126
128 void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
129
130#if 0
132 int numberOfCrossings() const {
133 return m_nCrossings;
134 }
135#endif
136
137
138protected:
140 double m_minx, m_maxx, m_miny, m_maxy, m_width, m_height;
141 };
142
145
146
147private:
148 std::unique_ptr<LayoutClusterPlanRepModule> m_planarLayouter;
149 std::unique_ptr<CCLayoutPackModule> m_packer;
150
151 double m_pageRatio;
152
154};
155
156}
Declaration of interface for algorithms that arrange/pack layouts of connected components.
Includes declaration of graph class.
Declaration and implementation of HashArray class.
Declaration of interface for planar layout algorithms for UML diagrams (used in planarization approac...
Basic declarations, included by all source files.
Base class of algorithms that arrange/pack layouts of connected components.
Stores additional attributes of a clustered graph (like layout information).
Representation of clustered graphs.
Planarized representations for clustered graphs.
The cluster planarization layout algorithm.
virtual void call(Graph &G, ClusterGraphAttributes &acGraph, ClusterGraph &cGraph, bool simpleCConnect=true)
Calls cluster planarization layout with cluster-graph attributes acGraph.
double pageRatio() const
Returns the current page ratio (= desired width / height of layout).
std::unique_ptr< CCLayoutPackModule > m_packer
The packing algorithm.
void computeClusterPositions(ClusterPlanRep &CP, Layout drawing, HashArray< int, ClusterPosition > &CA)
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components to pPacker.
int m_nCrossings
The number of crossings (not yet used!).
void setPlanarLayouter(LayoutClusterPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm to pPlanarLayouter.
void pageRatio(double ratio)
Sets the page ratio to ratio.
std::unique_ptr< LayoutClusterPlanRepModule > m_planarLayouter
The planar layouter.
ClusterPlanarizationLayout()
Creates an instance of cluster planarization layout.
virtual void call(Graph &G, ClusterGraphAttributes &acGraph, ClusterGraph &cGraph, EdgeArray< double > &edgeWeight, bool simpleCConnect=true)
Calls cluster planarization layout with cluster-graph attributes acGraph.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Indexed arrays using hashing for element access.
Definition HashArray.h:93
Interface for planar cluster layout algorithms.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:49
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#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.