Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

DavidsonHarel.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 
37 namespace ogdf {
38 
41 {
43 public:
44 
46  DavidsonHarel();
47 
49 
51  void setStartTemperature(int startTemp);
52 
54  void setNumberOfIterations(int steps);
55 
57  void addEnergyFunction(EnergyFunction *F, double weight);
58 
60  List<string> returnEnergyFunctionNames();
61 
63  List<double> returnEnergyFunctionWeights();
64 
66  void call(GraphAttributes &GA);
67 
68 private:
70  const static int m_defaultTemp;
72  const static double m_defaultRadius;
74  const static int m_iterationMultiplier;
76  const static double m_coolingFactor;
78  const static double m_shrinkFactor;
79 
82  double m_diskRadius;
83  double m_energy;
85 
88 
90 
92  void initParameters();
93 
95  node computeCandidateLayout(const GraphAttributes &, DPoint &) const;
96 
98  bool testEnergyValue(double newVal);
99 
101  double randNum() const;
102 
104  void computeFirstRadius(const GraphAttributes &AG);
105 
107  void computeInitialEnergy();
108 
110  void placeIsolatedNodes(GraphAttributes &AG) const;
111 
113  DavidsonHarel& operator=(const DavidsonHarel &dh);
116 };
117 
118 }
Declares class EnergyFunction...
The Davidson-Harel approach for drawing graphs.
Definition: DavidsonHarel.h:40
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
static const double m_defaultRadius
The default starting radius.
Definition: DavidsonHarel.h:72
double m_diskRadius
The radius of the disk around the old position of a vertex where the new position will be...
Definition: DavidsonHarel.h:82
static const double m_shrinkFactor
the constant by which the radius of the circle around each vertex is shrunk when the temperature is l...
Definition: DavidsonHarel.h:78
double m_shrinkingFactor
The factor for radius.
Definition: DavidsonHarel.h:81
The interface for energy functions for the Davidson Harel graph drawing method.
static const int m_iterationMultiplier
Per default, the number of iterations per temperature are set as a constant multiple of the number of...
Definition: DavidsonHarel.h:74
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
Class for the representation of nodes.
Definition: Graph_d.h:169
List< EnergyFunction * > m_energyFunctions
The list of the energy functions.
Definition: DavidsonHarel.h:86
int m_numberOfIterations
The number of iterations per temperature step.
Definition: DavidsonHarel.h:84
double m_energy
The current energy of the system.
Definition: DavidsonHarel.h:83
List< double > m_weightsOfEnergyFunctions
The list of the weights for the energy functions.
Definition: DavidsonHarel.h:87
static const int m_defaultTemp
The default starting temperature.
Definition: DavidsonHarel.h:70
DavidsonHarel(const DavidsonHarel &)
Fake copy constructor (dummy to avoid copying)
int m_temperature
The temperature during the annealing process.
Definition: DavidsonHarel.h:80
The namespace for all OGDF objects.
List< node > m_nonIsolatedNodes
The list of nodes with degree greater 0.
Definition: DavidsonHarel.h:89
static const double m_coolingFactor
The fraction by which the temperature is lowered after a temperature step is finished.
Definition: DavidsonHarel.h:76