Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

DavidsonHarel.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/List.h>
37 #include <ogdf/basic/basic.h>
38 #include <ogdf/basic/geometry.h>
40 
41 #include <string>
42 
43 namespace ogdf {
44 class GraphAttributes;
45 
49 
50 public:
52  DavidsonHarel();
53 
55 
57  void setStartTemperature(int startTemp);
58 
60  void setNumberOfIterations(int steps);
61 
63  void addEnergyFunction(EnergyFunction* F, double weight);
64 
66  List<string> returnEnergyFunctionNames();
67 
69  List<double> returnEnergyFunctionWeights();
70 
72  void call(GraphAttributes& GA);
73 
74 private:
76  const static int m_defaultTemp;
78  const static double m_defaultRadius;
80  const static int m_iterationMultiplier;
82  const static double m_coolingFactor;
84  const static double m_shrinkFactor;
85 
88  double m_diskRadius;
89  double m_energy;
91 
94 
96 
98  void initParameters();
99 
101  node computeCandidateLayout(const GraphAttributes&, DPoint&) const;
102 
104  bool testEnergyValue(double newVal);
105 
107  double randNum() const;
108 
110  void computeFirstRadius(const GraphAttributes& AG);
111 
113  void computeInitialEnergy();
114 
116  void placeIsolatedNodes(GraphAttributes& AG) const;
117 
119  DavidsonHarel& operator=(const DavidsonHarel& dh);
120 
123 };
124 
125 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::DavidsonHarel::m_energy
double m_energy
The current energy of the system.
Definition: DavidsonHarel.h:89
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::DavidsonHarel::m_defaultTemp
const static int m_defaultTemp
The default starting temperature.
Definition: DavidsonHarel.h:76
ogdf::DavidsonHarel::m_temperature
int m_temperature
The temperature during the annealing process.
Definition: DavidsonHarel.h:86
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:82
ogdf::DavidsonHarel::m_numberOfIterations
int m_numberOfIterations
The number of iterations per temperature step.
Definition: DavidsonHarel.h:90
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:84
ogdf::DavidsonHarel::m_defaultRadius
const static double m_defaultRadius
The default starting radius.
Definition: DavidsonHarel.h:78
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
EnergyFunction.h
Declares class EnergyFunction...
ogdf::DavidsonHarel::m_nonIsolatedNodes
List< node > m_nonIsolatedNodes
The list of nodes with degree greater 0.
Definition: DavidsonHarel.h:95
ogdf::DavidsonHarel::~DavidsonHarel
~DavidsonHarel()
Definition: DavidsonHarel.h:54
ogdf::DavidsonHarel::DavidsonHarel
DavidsonHarel(const DavidsonHarel &)
Fake copy constructor (dummy to avoid copying)
Definition: DavidsonHarel.h:122
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:80
basic.h
Basic declarations, included by all source files.
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:92
ogdf::davidson_harel::EnergyFunction
The interface for energy functions for the Davidson Harel graph drawing method.
Definition: EnergyFunction.h:52
List.h
Declaration of doubly linked lists and iterators.
ogdf::DavidsonHarel::m_shrinkingFactor
double m_shrinkingFactor
The factor for radius.
Definition: DavidsonHarel.h:87
ogdf::DavidsonHarel
The Davidson-Harel approach for drawing graphs.
Definition: DavidsonHarel.h:47
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:88
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::DavidsonHarel::m_weightsOfEnergyFunctions
List< double > m_weightsOfEnergyFunctions
The list of the weights for the energy functions.
Definition: DavidsonHarel.h:93