Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ClusterPlanarizationLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/HashArray.h>
37 #include <ogdf/basic/basic.h>
40 
41 #include <memory>
42 
43 namespace ogdf {
44 class ClusterGraph;
45 class ClusterGraphAttributes;
46 class ClusterPlanRep;
47 class Layout;
48 
50 
89 public:
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
131  int numberOfCrossings() const {
133  return m_nCrossings;
134  }
135 #endif
136 
137 
138 protected:
140  double m_minx, m_maxx, m_miny, m_maxy, m_width, m_height;
141  };
142 
143  void computeClusterPositions(ClusterPlanRep& CP, Layout drawing,
145 
146 
147 private:
148  std::unique_ptr<LayoutClusterPlanRepModule> m_planarLayouter;
149  std::unique_ptr<CCLayoutPackModule> m_packer;
150 
151  double m_pageRatio;
152 
154 };
155 
156 }
HashArray.h
Declaration and implementation of HashArray class.
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::ClusterPlanarizationLayout::setPacker
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components to pPacker.
Definition: ClusterPlanarizationLayout.h:128
Graph.h
Includes declaration of graph class.
ogdf::ClusterPlanarizationLayout::m_planarLayouter
std::unique_ptr< LayoutClusterPlanRepModule > m_planarLayouter
The planar layouter.
Definition: ClusterPlanarizationLayout.h:148
ogdf::ClusterPlanRep
Planarized representations for clustered graphs.
Definition: ClusterPlanRep.h:56
ogdf::ClusterPlanarizationLayout
The cluster planarization layout algorithm.
Definition: ClusterPlanarizationLayout.h:88
ogdf::ClusterPlanarizationLayout::setPlanarLayouter
void setPlanarLayouter(LayoutClusterPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm to pPlanarLayouter.
Definition: ClusterPlanarizationLayout.h:123
ogdf::ClusterPlanarizationLayout::m_pageRatio
double m_pageRatio
The page ratio.
Definition: ClusterPlanarizationLayout.h:151
ogdf::CCLayoutPackModule
Base class of algorithms that arrange/pack layouts of connected components.
Definition: CCLayoutPackModule.h:49
ogdf::ClusterPlanarizationLayout::pageRatio
double pageRatio() const
Returns the current page ratio (= desired width / height of layout).
Definition: ClusterPlanarizationLayout.h:117
ogdf::ClusterGraphAttributes
Stores additional attributes of a clustered graph (like layout information).
Definition: ClusterGraphAttributes.h:52
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::ClusterPlanarizationLayout::pageRatio
void pageRatio(double ratio)
Sets the page ratio to ratio.
Definition: ClusterPlanarizationLayout.h:120
ogdf::ClusterPlanarizationLayout::m_packer
std::unique_ptr< CCLayoutPackModule > m_packer
The packing algorithm.
Definition: ClusterPlanarizationLayout.h:149
ogdf::HashArray
Indexed arrays using hashing for element access.
Definition: HashArray.h:93
CCLayoutPackModule.h
Declaration of interface for algorithms that arrange/pack layouts of connected components.
ogdf::ClusterPlanarizationLayout::ClusterPosition::m_width
double m_width
Definition: ClusterPlanarizationLayout.h:140
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
LayoutClusterPlanRepModule.h
Declaration of interface for planar layout algorithms for UML diagrams (used in planarization approac...
ogdf::ClusterPlanarizationLayout::m_nCrossings
int m_nCrossings
The number of crossings (not yet used!).
Definition: ClusterPlanarizationLayout.h:153
ogdf::ClusterGraph
Representation of clustered graphs.
Definition: ClusterGraph.h:346
ogdf::LayoutClusterPlanRepModule
Interface for planar cluster layout algorithms.
Definition: LayoutClusterPlanRepModule.h:52
ogdf::ClusterPlanarizationLayout::ClusterPosition
Definition: ClusterPlanarizationLayout.h:139
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::ClusterPlanarizationLayout::~ClusterPlanarizationLayout
virtual ~ClusterPlanarizationLayout()
Destruction.
Definition: ClusterPlanarizationLayout.h:94