#include <DavidsonHarelLayout.h>

Public Types | |
| enum | SettingsParameter { spStandard, spRepulse, spPlanar } |
| Easy way to set fixed costs. More... | |
| enum | SpeedParameter { sppFast, sppMedium, sppHQ } |
| Easy way to set temperature and iterations. More... | |
Public Member Functions | |
| DavidsonHarelLayout () | |
| Creates an instance of Davidson-Harel layout. | |
| ~DavidsonHarelLayout () | |
| void | call (GraphAttributes &GA) |
| Calls the layout algorithm for graph attributes GA. | |
| void | fixSettings (SettingsParameter sp) |
| Fixes the cost values to special configurations. | |
| void | setStepping (DavidsonHarel::TuningParameter tp) |
| set the fineness of the candidate disc radisu | |
| void | setSpeed (SpeedParameter sp) |
| More convenient way of setting the speed of the algorithm. | |
| void | setPreferredEdgeLengthMultiplier (double multi) |
| Sets the preferred edge length multiplier for attraction. | |
| void | setRepulsionWeight (double w) |
| Sets the weight for the energy function Repulsion. | |
| double | getRepulsionWeight () const |
| Returns the weight for the energy function Repulsion. | |
| void | setAttractionWeight (double) |
| Sets the weight for the energy function Attraction. | |
| double | getAttractionWeight () const |
| Returns the weight for the energy function Attraction. | |
| void | setNodeOverlapWeight (double) |
| Sets the weight for the energy function NodeOverlap. | |
| double | getNodeOverlapWeight () const |
| Returns the weight for the energy function NodeOverlap. | |
| void | setPlanarityWeight (double) |
| Sets the weight for the energy function Planarity. | |
| double | getPlanarityWeight () const |
| Returns the weight for the energy function Planarity. | |
| void | setStartTemperature (int t) |
| Sets the starting temperature to t. | |
| int | getStartTemperature () const |
| Returns the starting temperature. | |
| void | setNumberOfIterations (int steps) |
| Sets the number of iterations per temperature step to steps. | |
| int | getNumberOfIterations () const |
| Returns the number of iterations per temperature step. | |
Private Attributes | |
| double | m_repulsionWeight |
| The weight for repulsion energy. | |
| double | m_attractionWeight |
| The weight for attraction energy. | |
| double | m_nodeOverlapWeight |
| The weight for node overlap energy. | |
| double | m_planarityWeight |
| The weight for edge crossing energy. | |
| int | m_startTemperature |
| The temperature at the start of the optimization. | |
| int | m_numberOfIterations |
| The number of iterations per temperature step. | |
| DavidsonHarel::TuningParameter | m_stepping |
| Defines if worst solutions can be chosen. | |
| SpeedParameter | m_speed |
| You can override this by manually setting iter=0. | |
| double | m_multiplier |
| By default, number of iterations per temperature step is number of vertices multiplied by multiplier. | |
| bool | m_crossings |
| Should crossings be computed? | |
The implementation used in DavidsonHarelLayout is based on the following publication:
Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions on Graphics 15(4), pp. 301-331, 1996.
Definition at line 76 of file DavidsonHarelLayout.h.
| ogdf::DavidsonHarelLayout::DavidsonHarelLayout | ( | ) |
Creates an instance of Davidson-Harel layout.
| ogdf::DavidsonHarelLayout::~DavidsonHarelLayout | ( | ) | [inline] |
Definition at line 88 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::call | ( | GraphAttributes & | GA | ) | [virtual] |
| void ogdf::DavidsonHarelLayout::fixSettings | ( | SettingsParameter | sp | ) |
Fixes the cost values to special configurations.
| void ogdf::DavidsonHarelLayout::setStepping | ( | DavidsonHarel::TuningParameter | tp | ) |
set the fineness of the candidate disc radisu
| void ogdf::DavidsonHarelLayout::setSpeed | ( | SpeedParameter | sp | ) |
More convenient way of setting the speed of the algorithm.
Influences number of iterations per temperature step, starting temperature, and cooling factor.
| void ogdf::DavidsonHarelLayout::setPreferredEdgeLengthMultiplier | ( | double | multi | ) | [inline] |
Sets the preferred edge length multiplier for attraction.
This is bad design, cause you dont need to have an attraction function, DH is purely modular and independent with its cost functions.
Definition at line 111 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::setRepulsionWeight | ( | double | w | ) |
Sets the weight for the energy function Repulsion.
| double ogdf::DavidsonHarelLayout::getRepulsionWeight | ( | ) | const [inline] |
Returns the weight for the energy function Repulsion.
Definition at line 117 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::setAttractionWeight | ( | double | ) |
Sets the weight for the energy function Attraction.
| double ogdf::DavidsonHarelLayout::getAttractionWeight | ( | ) | const [inline] |
Returns the weight for the energy function Attraction.
Definition at line 123 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::setNodeOverlapWeight | ( | double | ) |
Sets the weight for the energy function NodeOverlap.
| double ogdf::DavidsonHarelLayout::getNodeOverlapWeight | ( | ) | const [inline] |
Returns the weight for the energy function NodeOverlap.
Definition at line 129 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::setPlanarityWeight | ( | double | ) |
Sets the weight for the energy function Planarity.
| double ogdf::DavidsonHarelLayout::getPlanarityWeight | ( | ) | const [inline] |
Returns the weight for the energy function Planarity.
Definition at line 135 of file DavidsonHarelLayout.h.
| void ogdf::DavidsonHarelLayout::setStartTemperature | ( | int | t | ) |
Sets the starting temperature to t.
| int ogdf::DavidsonHarelLayout::getStartTemperature | ( | ) | const [inline] |
| void ogdf::DavidsonHarelLayout::setNumberOfIterations | ( | int | steps | ) |
Sets the number of iterations per temperature step to steps.
| int ogdf::DavidsonHarelLayout::getNumberOfIterations | ( | ) | const [inline] |
Returns the number of iterations per temperature step.
Definition at line 147 of file DavidsonHarelLayout.h.
double ogdf::DavidsonHarelLayout::m_repulsionWeight [private] |
double ogdf::DavidsonHarelLayout::m_attractionWeight [private] |
double ogdf::DavidsonHarelLayout::m_nodeOverlapWeight [private] |
double ogdf::DavidsonHarelLayout::m_planarityWeight [private] |
int ogdf::DavidsonHarelLayout::m_startTemperature [private] |
The temperature at the start of the optimization.
Definition at line 154 of file DavidsonHarelLayout.h.
int ogdf::DavidsonHarelLayout::m_numberOfIterations [private] |
The number of iterations per temperature step.
Definition at line 155 of file DavidsonHarelLayout.h.
You can override this by manually setting iter=0.
Definition at line 157 of file DavidsonHarelLayout.h.
double ogdf::DavidsonHarelLayout::m_multiplier [private] |
By default, number of iterations per temperature step is number of vertices multiplied by multiplier.
Definition at line 158 of file DavidsonHarelLayout.h.
bool ogdf::DavidsonHarelLayout::m_crossings [private] |