Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046
00047 #ifndef OGDF_CLUSTER_PLANARIZATION_LAYOUT_H
00048 #define OGDF_CLUSTER_PLANARIZATION_LAYOUT_H
00049
00050
00051 #include <ogdf/module/LayoutClusterPlanRepModule.h>
00052 #include <ogdf/module/CCLayoutPackModule.h>
00053 #include <ogdf/basic/ModuleOption.h>
00054
00055
00056 namespace ogdf {
00057
00058
00060
00097 class OGDF_EXPORT ClusterPlanarizationLayout
00098 {
00099 public:
00101 ClusterPlanarizationLayout();
00102
00103
00104 virtual ~ClusterPlanarizationLayout() { }
00105
00106
00107
00109
00115 virtual void call(Graph& G,
00116 ClusterGraphAttributes& acGraph,
00117 ClusterGraph& cGraph,
00118 bool simpleCConnect = true);
00120
00127 virtual void call(Graph& G,
00128 ClusterGraphAttributes& acGraph,
00129 ClusterGraph& cGraph,
00130 EdgeArray<double>& edgeWeight,
00131 bool simpleCConnect = true);
00132
00133
00135 double pageRatio() const {
00136 return m_pageRatio;
00137 }
00138
00140 void pageRatio(double ratio) {
00141 m_pageRatio = ratio;
00142 }
00143
00145 void setPlanarLayouter(LayoutClusterPlanRepModule *pPlanarLayouter) {
00146 m_planarLayouter.set(pPlanarLayouter);
00147 }
00148
00150 void setPacker(CCLayoutPackModule *pPacker) {
00151 m_packer.set(pPacker);
00152 }
00153
00155
00156
00157
00158
00159
00160 protected:
00161 struct ClusterPosition
00162 {
00163 double m_minx, m_maxx, m_miny, m_maxy, m_width, m_height;
00164 };
00165
00166 void computeClusterPositions(
00167 ClusterPlanRep& CP,
00168 Layout drawing,
00169 HashArray<int, ClusterPosition>& CA);
00170
00171
00172 private:
00173 ModuleOption<LayoutClusterPlanRepModule> m_planarLayouter;
00174 ModuleOption<CCLayoutPackModule> m_packer;
00175
00176 double m_pageRatio;
00177
00178 int m_nCrossings;
00179 };
00180
00181
00182 }
00183
00184
00185 #endif