00001 /* 00002 * $Revision: 1.4 $ 00003 * 00004 * last checkin: 00005 * $Author: gutwenger $ 00006 * $Date: 2007-11-13 21:44:33 +0100 (Di, 13 Nov 2007) $ 00007 ***************************************************************/ 00008 00050 #ifdef _MSC_VER 00051 #pragma once 00052 #endif 00053 00054 00055 #ifndef OGDF_CIRCULAR_LAYOUT_H 00056 #define OGDF_CIRCULAR_LAYOUT_H 00057 00058 00059 #include <ogdf/module/LayoutModule.h> 00060 00061 00062 namespace ogdf { 00063 00064 class GraphCopyAttributes; 00065 struct ClusterStructure; 00066 00068 00099 class CircularLayout : public LayoutModule 00100 { 00101 public: 00103 CircularLayout(); 00104 00105 // destructor 00106 ~CircularLayout() { } 00107 00108 00114 00115 void call(GraphAttributes &GA); 00116 00117 00123 00124 double minDistCircle() const { return m_minDistCircle; } 00125 00127 void minDistCircle(double x) { m_minDistCircle = x; } 00128 00130 double minDistLevel() const { return m_minDistLevel; } 00131 00133 void minDistLevel(double x) { m_minDistLevel = x; } 00134 00136 double minDistSibling() const { return m_minDistSibling; } 00137 00139 void minDistSibling(double x) { m_minDistSibling = x; } 00140 00142 double minDistCC() const { return m_minDistCC; } 00143 00145 void minDistCC(double x) { m_minDistCC = x; } 00146 00148 double pageRatio() const { return m_pageRatio; } 00149 00151 void pageRatio(double x) { m_pageRatio = x; } 00152 00154 00155 private: 00156 double m_minDistCircle; 00157 double m_minDistLevel; 00158 double m_minDistSibling; 00159 double m_minDistCC; 00160 double m_pageRatio; 00161 00162 void doCall(GraphCopyAttributes &AG, ClusterStructure &C); 00163 00164 void assignClustersByBiconnectedComponents(ClusterStructure &C); 00165 00166 int sizeBC(node vB); 00167 00168 void computePreferedAngles( 00169 ClusterStructure &C, 00170 const Array<double> &outerRadius, 00171 Array<double> &preferedAngle); 00172 00173 void assignPrefAngle(ClusterStructure &C, 00174 const Array<double> &outerRadius, 00175 Array<double> &preferedAngle, 00176 int c, 00177 int l, 00178 double r1); 00179 00180 }; 00181 00182 00183 } // end namespace ogdf 00184 00185 00186 #endif