Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

DavidsonHarel.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 
37 namespace ogdf {
38 
42 
43 public:
45  DavidsonHarel();
46 
48 
50  void setStartTemperature(int startTemp);
51 
53  void setNumberOfIterations(int steps);
54 
56  void addEnergyFunction(EnergyFunction* F, double weight);
57 
59  List<string> returnEnergyFunctionNames();
60 
62  List<double> returnEnergyFunctionWeights();
63 
65  void call(GraphAttributes& GA);
66 
67 private:
69  const static int m_defaultTemp;
71  const static double m_defaultRadius;
73  const static int m_iterationMultiplier;
75  const static double m_coolingFactor;
77  const static double m_shrinkFactor;
78 
81  double m_diskRadius;
82  double m_energy;
84 
87 
89 
91  void initParameters();
92 
94  node computeCandidateLayout(const GraphAttributes&, DPoint&) const;
95 
97  bool testEnergyValue(double newVal);
98 
100  double randNum() const;
101 
103  void computeFirstRadius(const GraphAttributes& AG);
104 
106  void computeInitialEnergy();
107 
109  void placeIsolatedNodes(GraphAttributes& AG) const;
110 
112  DavidsonHarel& operator=(const DavidsonHarel& dh);
113 
116 };
117 
118 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::DavidsonHarel::m_energy
double m_energy
The current energy of the system.
Definition: DavidsonHarel.h:82
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
ogdf::GenericPoint< double >
ogdf::DavidsonHarel::m_defaultTemp
const static int m_defaultTemp
The default starting temperature.
Definition: DavidsonHarel.h:69
ogdf::DavidsonHarel::m_temperature
int m_temperature
The temperature during the annealing process.
Definition: DavidsonHarel.h:79
ogdf::DavidsonHarel::m_coolingFactor
const static double m_coolingFactor
The fraction by which the temperature is lowered after a temperature step is finished.
Definition: DavidsonHarel.h:75
ogdf::DavidsonHarel::m_numberOfIterations
int m_numberOfIterations
The number of iterations per temperature step.
Definition: DavidsonHarel.h:83
ogdf::DavidsonHarel::m_shrinkFactor
const static 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:77
ogdf::DavidsonHarel::m_defaultRadius
const static double m_defaultRadius
The default starting radius.
Definition: DavidsonHarel.h:71
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
EnergyFunction.h
Declares class EnergyFunction...
ogdf::DavidsonHarel::m_nonIsolatedNodes
List< node > m_nonIsolatedNodes
The list of nodes with degree greater 0.
Definition: DavidsonHarel.h:88
ogdf::DavidsonHarel::~DavidsonHarel
~DavidsonHarel()
Definition: DavidsonHarel.h:47
ogdf::DavidsonHarel::DavidsonHarel
DavidsonHarel(const DavidsonHarel &)
Fake copy constructor (dummy to avoid copying)
Definition: DavidsonHarel.h:115
ogdf::DavidsonHarel::m_iterationMultiplier
const static int m_iterationMultiplier
Per default, the number of iterations per temperature are set as a constant multiple of the number of...
Definition: DavidsonHarel.h:73
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::DavidsonHarel::m_energyFunctions
List< EnergyFunction * > m_energyFunctions
The list of the energy functions.
Definition: DavidsonHarel.h:85
ogdf::davidson_harel::EnergyFunction
The interface for energy functions for the Davidson Harel graph drawing method.
Definition: EnergyFunction.h:47
ogdf::DavidsonHarel::m_shrinkingFactor
double m_shrinkingFactor
The factor for radius.
Definition: DavidsonHarel.h:80
ogdf::DavidsonHarel
The Davidson-Harel approach for drawing graphs.
Definition: DavidsonHarel.h:40
ogdf::DavidsonHarel::m_diskRadius
double m_diskRadius
The radius of the disk around the old position of a vertex where the new position will be.
Definition: DavidsonHarel.h:81
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::DavidsonHarel::m_weightsOfEnergyFunctions
List< double > m_weightsOfEnergyFunctions
The list of the weights for the energy functions.
Definition: DavidsonHarel.h:86