00001 /* 00002 * $Revision: 1.3 $ 00003 * 00004 * last checkin: 00005 * $Author: klein $ 00006 * $Date: 2007-11-12 15:59:17 +0100 (Mo, 12 Nov 2007) $ 00007 ***************************************************************/ 00008 00053 #ifdef _MSC_VER 00054 #pragma once 00055 #endif 00056 00057 #ifndef OGDF_DAVIDSON_HAREL_LAYOUT_H 00058 #define OGDF_DAVIDSON_HAREL_LAYOUT_H 00059 00060 00061 #include <ogdf/module/LayoutModule.h> 00062 #include <ogdf/energybased/DavidsonHarel.h> 00063 00064 00065 namespace ogdf { 00066 00067 00069 00076 class DavidsonHarelLayout : public LayoutModule 00077 { 00078 public: 00080 enum SettingsParameter {spStandard, spRepulse, spPlanar}; //tuning of costs 00081 00083 enum SpeedParameter {sppFast, sppMedium, sppHQ}; 00084 00086 DavidsonHarelLayout(); 00087 00088 ~DavidsonHarelLayout(){} 00089 00091 void call(GraphAttributes &GA); 00092 00094 void fixSettings(SettingsParameter sp); 00095 00097 void setStepping(DavidsonHarel::TuningParameter tp); 00098 00100 00104 void setSpeed(SpeedParameter sp); 00105 00107 00111 void setPreferredEdgeLengthMultiplier(double multi) {m_multiplier = multi;} 00112 00114 void setRepulsionWeight(double w); 00115 00117 double getRepulsionWeight() const {return m_repulsionWeight;} 00118 00120 void setAttractionWeight(double); 00121 00123 double getAttractionWeight() const {return m_attractionWeight;} 00124 00126 void setNodeOverlapWeight(double); 00127 00129 double getNodeOverlapWeight() const {return m_nodeOverlapWeight;} 00130 00132 void setPlanarityWeight(double); 00133 00135 double getPlanarityWeight() const {return m_planarityWeight;} 00136 00138 void setStartTemperature(int t); 00139 00141 int getStartTemperature() const {return m_startTemperature;} 00142 00144 void setNumberOfIterations(int steps); 00145 00147 int getNumberOfIterations() const {return m_numberOfIterations;} 00148 00149 private: 00150 double m_repulsionWeight; 00151 double m_attractionWeight; 00152 double m_nodeOverlapWeight; 00153 double m_planarityWeight; 00154 int m_startTemperature; 00155 int m_numberOfIterations; 00156 DavidsonHarel::TuningParameter m_stepping; 00157 SpeedParameter m_speed; 00158 double m_multiplier; 00159 bool m_crossings; 00160 }; 00161 00162 } 00163 #endif