Declares class EnergyFunction...
The Davidson-Harel approach for drawing graphs.
static const double m_shrinkFactor
the constant by which the radius of the circle around each vertex is shrunk when the temperature is l...
double m_energy
The current energy of the system.
void setNumberOfIterations(int steps)
Sets the number of iterations for each temperature step to steps.
static const double m_coolingFactor
The fraction by which the temperature is lowered after a temperature step is finished.
DavidsonHarel & operator=(const DavidsonHarel &dh)
Fake assignment operator (dummy to avoid copying)
void call(GraphAttributes &GA)
Calls the Davidson-Harel method for graph GA.
int m_temperature
The temperature during the annealing process.
double m_diskRadius
The radius of the disk around the old position of a vertex where the new position will be.
List< node > m_nonIsolatedNodes
The list of nodes with degree greater 0.
int m_numberOfIterations
The number of iterations per temperature step.
void addEnergyFunction(EnergyFunction *F, double weight)
Adds an energy function F with a certain weight.
static const int m_defaultTemp
The default starting temperature.
void computeFirstRadius(const GraphAttributes &AG)
Computes the first disk radius as the half the diamter of the enclosing rectangle.
double m_shrinkingFactor
The factor for radius.
DavidsonHarel()
Creates an instance of Davidsen-Harel base class.
List< EnergyFunction * > m_energyFunctions
The list of the energy functions.
void setStartTemperature(int startTemp)
Sets the start temperature to startTemp.
static const int m_iterationMultiplier
Per default, the number of iterations per temperature are set as a constant multiple of the number of...
void initParameters()
Resets the parameters for subsequent runs.
double randNum() const
Computes a random number between zero and one.
void computeInitialEnergy()
Computes the energy of the initial layout and stores it in m_energy.
DavidsonHarel(const DavidsonHarel &)
Fake copy constructor (dummy to avoid copying)
List< double > returnEnergyFunctionWeights()
Returns a list of the weights of the energy functions.
void placeIsolatedNodes(GraphAttributes &AG) const
Computes positions for the vertices of degree zero.
node computeCandidateLayout(const GraphAttributes &, DPoint &) const
Randomly computes a node and a new position for that node.
List< double > m_weightsOfEnergyFunctions
The list of the weights for the energy functions.
List< string > returnEnergyFunctionNames()
Returns a list of the names of the energy functions.
bool testEnergyValue(double newVal)
Tests if new energy value satisfies annealing property (only better if m_fineTune).
static const double m_defaultRadius
The default starting radius.
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Class for the representation of nodes.
The interface for energy functions for the Davidson Harel graph drawing method.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.