54 None, PositionDifference, Stress
59 m_hasEdgeCostsAttribute(false), m_hasInitialLayout(false), m_numberOfIterations(
60 200), m_edgeCosts(100), m_avgEdgeCosts(-1), m_componentLayout(
62 false), m_fixZCoords(false) {
74 inline void hasInitialLayout(
bool hasInitialLayout);
77 inline void fixXCoordinates(
bool fix);
80 inline void fixYCoordinates(
bool fix);
83 inline void fixZCoordinates(
bool fix);
87 inline void layoutComponentsSeparately(
bool separate);
91 inline void setEdgeCosts(
double edgeCosts);
95 inline void setIterations(
int numberOfIterations);
101 inline void useEdgeCostsAttribute(
bool useEdgeCostsAttribute);
154 void calcWeights(
const Graph& G,
173 const double prevStress,
const double curStress);
176 void initMatrices(
const Graph& G,
193 void replaceInfinityDistances(
208 m_hasInitialLayout = hasInitialLayout;
212 m_componentLayout = separate;
216 m_edgeCosts = (edgeCosts > 0) ? edgeCosts : 100;
220 m_numberOfIterations = (numberOfIterations > 0) ? numberOfIterations : 100;
224 m_terminationCriterion = criterion;
228 m_hasEdgeCostsAttribute = useEdgeCostsAttribute;
void layoutComponentsSeparately(bool separate)
Sets whether the graph's components should be layouted separately or a dummy distance should be used ...
bool m_hasInitialLayout
Tells whether an initial layout has to be computed or not.
double m_avgEdgeCosts
The average edge costs. Needed to define distances of nodes belonging to different graph components...
void fixYCoordinates(bool fix)
Tells whether the y coordinates are allowed to be modified or not.
static const int DEFAULT_NUMBER_OF_PIVOTS
Default number of pivots used for the initial Pivot-MDS layout.
bool m_fixZCoords
Indicates whether the z coordinates will be modified or not.
Data type for general directed graphs (adjacency list representation).
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
void useEdgeCostsAttribute(bool useEdgeCostsAttribute)
Tells whether the edge costs are uniform or defined by some edge costs attribute. ...
Splits and packs the components of a Graph.
void setIterations(int numberOfIterations)
Sets a fixed number of iterations for stress majorization. If the new value is smaller or equal 0 the...
Energy-based layout using stress minimization.
Declaration of several shortest path algorithms.
bool m_hasEdgeCostsAttribute
Tells whether the stress minimization is based on uniform edge costs or a edge costs attribute...
Declaration of the pivot MDS.
int m_numberOfIterations
Number of iterations performed by the stress minimization.
void hasInitialLayout(bool hasInitialLayout)
Tells whether the current layout should be used or the initial layout needs to be computed...
void convergenceCriterion(TerminationCriterion criterion)
Tells which TerminationCriterion should be used.
Dynamic arrays indexed with nodes.
Stores additional attributes of a graph (like layout information).
double m_edgeCosts
The weight of an edge.
StressMinimization()
Constructor: Constructs instance of stress majorization.
bool m_fixXCoords
Indicates whether the x coordinates will be modified or not.
~StressMinimization()
Destructor.
Declaration of interface for layout algorithms (class LayoutModule)
void setEdgeCosts(double edgeCosts)
Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default ...
Interface of general layout algorithms.
Two geometric objects do not intersect.
Declaration of simple graph algorithms.
static const double EPSILON
Convergence constant.
The namespace for all OGDF objects.
TerminationCriterion m_terminationCriterion
Indicates whether epsilon convergence is used or not.
void fixXCoordinates(bool fix)
Tells whether the x coordinates are allowed to be modified or not.
bool m_componentLayout
Indicates whether the components should be treated separately.
bool m_fixYCoords
Indicates whether the y coordinates will be modified or not.