173 m_initialTemperature = (x < m_minimalTemperature) ? m_minimalTemperature : x;
203 if (x > Math::pi / 2.0) {
217 if (x > Math::pi / 2.0) {
220 m_oscillationAngle = x;
234 m_rotationSensitivity = x;
248 m_oscillationSensitivity = x;
256 if (n == 1 || n == 2) {
257 m_attractionFormula = n;
276 double length(
double x,
double y = 0)
const {
return sqrt(x * x + y * y); }
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of graph copy classes.
Declaration of interface for layout algorithms (class LayoutModule)
The energy-based GEM layout algorithm.
double oscillationAngle() const
Returns the opening angle for oscillations.
GEMLayout & operator=(const GEMLayout &fl)
Assignment operator.
void updateNode(GraphCopy &GC, GraphAttributes &AGC, node v)
Updates the node data for node v.
double oscillationSensitivity() const
Returns the oscillation sensitivity.
double m_minimalTemperature
The minimal temperature.
void minimalTemperature(double x)
Sets the minimal temperature to x.
GEMLayout()
Creates an instance of GEM layout.
double rotationSensitivity() const
Returns the rotation sensitivity.
double m_pageRatio
The page ratio used for the layout of connected components.
NodeArray< double > m_localTemperature
local temperature of the node
double m_cos
Cosine of m_oscillationAngle / 2.
double minimalTemperature() const
Returns the minimal temperature.
virtual void call(GraphAttributes &GA) override
Calls the layout algorithm for graph attributes GA.
double m_initialTemperature
The initial temperature.
void numberOfRounds(int n)
Sets the maximal number of round per node to n.
double m_rotationAngle
The opening angle for rotations.
double minDistCC() const
Returns the minimal distance between connected components.
double m_rotationSensitivity
The rotation sensitivity.
double m_barycenterX
Weighted sum of x-coordinates of all nodes.
double m_minDistCC
The minimal distance between connected components.
NodeArray< double > m_impulseX
x-coordinate of the last impulse of the node
double initialTemperature() const
Returns the initial temperature.
double m_maximalDisturbance
The maximal disturbance.
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).
double m_oscillationSensitivity
The oscillation sensitivity.
void computeImpulse(GraphCopy &GC, GraphAttributes &AGC, node v)
Computes the new impulse for node v.
int numberOfRounds() const
Returns the maximal number of rounds per node.
double rotationAngle() const
Returns the opening angle for rotations.
void minDistCC(double x)
Sets the minimal distance between connected components to x.
void rotationSensitivity(double x)
Sets the rotation sensitivity to x (0 <= x <= 1).
void gravitationalConstant(double x)
Sets the gravitational constant to x; must be >= 0. Attention! Only (very) small values give acceptab...
double m_sin
Sine of (pi + m_rotationAngle) / 2.
void oscillationAngle(double x)
Sets the opening angle for oscillations to x (0 <= x <= pi / 2).
NodeArray< double > m_skewGauge
skew gauge of the node
int attractionFormula() const
Returns the used formula for attraction (1 = Fruchterman / Reingold, 2 = GEM).
double weight(node v) const
Returns the weight of node v according to its degree.
double m_newImpulseY
y-coordinate of the new impulse of the current node.
double m_oscillationAngle
The opening angle for oscillations.
double pageRatio() const
Returns the page ratio used for the layout of connected components.
void pageRatio(double x)
Sets the page ratio used for the layout of connected components to x.
double maximalDisturbance() const
Returns the maximal disturbance.
void initialTemperature(double x)
Sets the initial temperature to x; must be >= minimalTemperature.
double length(double x, double y=0) const
Returns the length of the vector (x,y).
double gravitationalConstant() const
Returns the gravitational constant.
void attractionFormula(int n)
sets the formula for attraction to n (1 = Fruchterman / Reingold, 2 = GEM).
GEMLayout(const GEMLayout &fl)
Copy constructor.
int m_attractionFormula
The used formula for attraction.
double desiredLength() const
Returns the desired edge length.
void desiredLength(double x)
Sets the desired edge length to x; must be >= 0.
int m_numberOfRounds
The maximal number of rounds per node.
double m_gravitationalConstant
The gravitational constant.
double m_desiredLength
The desired edge length.
double m_globalTemperature
Average of all node temperatures.
double m_barycenterY
Weighted sum of y-coordinates of all nodes.
double m_newImpulseX
x-coordinate of the new impulse of the current node.
NodeArray< double > m_impulseY
y-coordinate of the last impulse of the node
Stores additional attributes of a graph (like layout information).
Copies of graphs supporting edge splitting.
Interface of general layout algorithms.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
int degree() const
Returns the degree of the node (indegree + outdegree).
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.