Open
Graph Drawing
Framework

 v.2012.05
 

CircularLayout.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00042 #ifdef _MSC_VER
00043 #pragma once
00044 #endif
00045 
00046 
00047 #ifndef OGDF_CIRCULAR_LAYOUT_H
00048 #define OGDF_CIRCULAR_LAYOUT_H
00049 
00050 
00051 #include <ogdf/module/LayoutModule.h>
00052 
00053 
00054 namespace ogdf {
00055 
00056 class OGDF_EXPORT GraphCopyAttributes;
00057 struct ClusterStructure;
00058 
00060 
00091 class OGDF_EXPORT CircularLayout : public LayoutModule
00092 {
00093 public:
00095     CircularLayout();
00096 
00097     // destructor
00098     ~CircularLayout() { }
00099 
00100 
00106 
00107     void call(GraphAttributes &GA);
00108 
00109 
00115 
00116     double minDistCircle() const { return m_minDistCircle; }
00117 
00119     void minDistCircle(double x) { m_minDistCircle = x; }
00120 
00122     double minDistLevel() const { return m_minDistLevel; }
00123 
00125     void minDistLevel(double x) { m_minDistLevel = x; }
00126 
00128     double minDistSibling() const { return m_minDistSibling; }
00129 
00131     void minDistSibling(double x) { m_minDistSibling = x; }
00132 
00134     double minDistCC() const { return m_minDistCC; }
00135 
00137     void minDistCC(double x) { m_minDistCC = x; }
00138 
00140     double pageRatio() const { return m_pageRatio; }
00141 
00143     void pageRatio(double x) { m_pageRatio = x; }
00144 
00146 
00147 private:
00148     double m_minDistCircle;  
00149     double m_minDistLevel;   
00150     double m_minDistSibling; 
00151     double m_minDistCC;      
00152     double m_pageRatio;      
00153 
00154     void doCall(GraphCopyAttributes &AG, ClusterStructure &C);
00155 
00156     void assignClustersByBiconnectedComponents(ClusterStructure &C);
00157 
00158     int sizeBC(node vB);
00159 
00160     void computePreferedAngles(
00161         ClusterStructure &C,
00162         const Array<double> &outerRadius,
00163         Array<double> &preferedAngle);
00164 
00165     void assignPrefAngle(ClusterStructure &C,
00166         const Array<double> &outerRadius,
00167         Array<double> &preferedAngle,
00168         int c,
00169         int l,
00170         double r1);
00171 
00172 };
00173 
00174 
00175 } // end namespace ogdf
00176 
00177 
00178 #endif