|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
38 class GraphAttributes;
58 void set(
int i,
double x,
double y) {
64 double getX(
int i)
const {
return m_x[i]; }
67 double getY(
int i)
const {
return m_y[i]; }
131 void translate(
GraphAttributes& graphAttributes,
double dx,
double dy);
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
LayoutModule * m_pSubLayout
Layout module to call for a new layout.
virtual ~ProcrustesSubLayout()
Destructor.
~ProcrustesPointSet()
Destructor.
bool scaleToInitialLayout() const
Should the new layout scale be used or the initial scale? Defaults to true.
double * m_x
X coordinates.
int m_numPoints
Number of points.
double m_originX
Original average center's x when normalized.
Declaration of interface for layout algorithms (class LayoutModule)
double m_scale
Scale factor.
double scale() const
Returns the scale factor.
double angle() const
Returns the rotation angle.
ProcrustesPointSet(int numPoints)
Constructor for allocating memory for numPoints points.
double m_originY
Original average center's y when normalized.
double m_angle
If rotated, the angle.
void normalize(bool flip=false)
Translates and scales the set such that the average center is 0, 0 and the average size is 1....
double originY() const
Returns the origin's y.
double * m_y
Y coordinates.
bool isFlipped() const
Returns true if the point set is flipped by y coord.
Simple procrustes analysis.
double compare(const ProcrustesPointSet &other) const
Calculates a value how good the two point sets match.
Basic declarations, included by all source files.
bool m_scaleToInitialLayout
Option for enabling/disabling scaling to initial layout scale.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
double getY(int i) const
Returns i'th y-coordinate.
double originX() const
Returns the origin's x.
double getX(int i) const
Returns i'th x-coordinate.
void rotateTo(const ProcrustesPointSet &other)
Rotates the point set so it fits somehow on other.
void set(int i, double x, double y)
Sets i'th coordinate.
Interface of general layout algorithms.
void setScaleToInitialLayout(bool flag)
Should the new layout scale be used or the initial scale? Defaults to true.