163 m_numberOfRounds = (n < 0) ? 0 : n;
171 m_minimalTemperature = (x < 0) ? 0 : x;
179 m_initialTemperature = (x < m_minimalTemperature) ? m_minimalTemperature : x;
188 m_gravitationalConstant = (x < 0) ? 0 : x;
196 m_desiredLength = (x < 0) ? 0 : x;
204 m_maximalDisturbance = (x < 0) ? 0 : x;
224 m_oscillationAngle = x;
234 m_rotationSensitivity = x;
244 m_oscillationSensitivity = x;
252 if(n == 1 || n == 2) m_attractionFormula = n;
270 double length(
double x,
double y = 0)
const {
271 return sqrt(x * x + y * y);
276 return (
double)(v->
degree()) / 2.5 + 1.0;
double m_gravitationalConstant
The gravitational constant.
void pageRatio(double x)
Sets the page ratio used for the layout of connected components to x.
void attractionFormula(int n)
sets the formula for attraction to n (1 = Fruchterman / Reingold, 2 = GEM).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
double maximalDisturbance() const
Returns the maximal disturbance.
double m_initialTemperature
The initial temperature.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
void rotationAngle(double x)
Sets the opening angle for rotations to x (0 <= x <= pi / 2).
void maximalDisturbance(double x)
Sets the maximal disturbance to x; must be >= 0.
void oscillationSensitivity(double x)
Sets the oscillation sensitivity to x (0 <= x <= 1).
NodeArray< double > m_impulseY
y-coordinate of the last impulse of the node
int degree() const
Returns the degree of the node (indegree + outdegree).
int attractionFormula() const
Returns the used formula for attraction (1 = Fruchterman / Reingold, 2 = GEM).
void minDistCC(double x)
Sets the minimal distance between connected components to x.
double initialTemperature() const
Returns the initial temperature.
double m_sin
Sine of (pi + m_rotationAngle) / 2.
double minDistCC() const
Returns the minimal distance between connected components.
double length(double x, double y=0) const
Returns the length of the vector (x,y).
void desiredLength(double x)
Sets the desired edge length to x; must be >= 0.
double m_desiredLength
The desired edge length.
double oscillationAngle() const
Returns the opening angle for oscillations.
double m_rotationSensitivity
The rotation sensitivity.
double m_rotationAngle
The opening angle for rotations.
double pageRatio() const
Returns the page ratio used for the layout of connected components.
constexpr double pi
The constant .
double m_oscillationAngle
The opening angle for oscillations.
int m_attractionFormula
The used formula for attraction.
double weight(node v) const
Returns the weight of node v according to its degree.
void initialTemperature(double x)
Sets the initial temperature to x; must be >= minimalTemperature.
Stores additional attributes of a graph (like layout information).
double desiredLength() const
Returns the desired edge length.
Declaration of graph copy classes.
double m_pageRatio
The page ratio used for the layout of connected components.
double oscillationSensitivity() const
Returns the oscillation sensitivity.
void gravitationalConstant(double x)
Sets the gravitational constant to x; must be >= 0. Attention! Only (very) small values give acceptab...
NodeArray< double > m_skewGauge
skew gauge of the node
Copies of graphs supporting edge splitting.
Declaration of interface for layout algorithms (class LayoutModule)
double m_oscillationSensitivity
The oscillation sensitivity.
double m_minDistCC
The minimal distance between connected components.
Class for the representation of nodes.
double rotationAngle() const
Returns the opening angle for rotations.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Interface of general layout algorithms.
NodeArray< double > m_localTemperature
local temperature of the node
double m_barycenterX
Weighted sum of x-coordinates of all nodes.
int numberOfRounds() const
Returns the maximal number of rounds per node.
The energy-based GEM layout algorithm.
double minimalTemperature() const
Returns the minimal temperature.
double rotationSensitivity() const
Returns the rotation sensitivity.
double m_barycenterY
Weighted sum of y-coordinates of all nodes.
void oscillationAngle(double x)
Sets the opening angle for oscillations to x (0 <= x <= pi / 2).
The namespace for all OGDF objects.
double m_newImpulseY
y-coordinate of the new impulse of the current node.
double m_minimalTemperature
The minimal temperature.
double m_cos
Cosine of m_oscillationAngle / 2.
NodeArray< double > m_impulseX
x-coordinate of the last impulse of the node
void numberOfRounds(int n)
Sets the maximal number of round per node to n.
int m_numberOfRounds
The maximal number of rounds per node.
void minimalTemperature(double x)
Sets the minimal temperature to x.
double m_newImpulseX
x-coordinate of the new impulse of the current node.
double m_maximalDisturbance
The maximal disturbance.
void rotationSensitivity(double x)
Sets the rotation sensitivity to x (0 <= x <= 1).
double gravitationalConstant() const
Returns the gravitational constant.
double m_globalTemperature
Average of all node temperatures.