#include <ogdf/misclayout/ProcrustesSubLayout.h>
Public Member Functions | |
ProcrustesPointSet (int numPoints) | |
Constructor for allocating memory for numPoints points. | |
~ProcrustesPointSet () | |
Destructor. | |
double | angle () const |
Returns the rotation angle. | |
double | compare (const ProcrustesPointSet &other) const |
Calculates a value how good the two point sets match. | |
double | getX (int i) const |
Returns i'th x-coordinate. | |
double | getY (int i) const |
Returns i'th y-coordinate. | |
bool | isFlipped () const |
Returns true if the point set is flipped by y coord. | |
void | normalize (bool flip=false) |
Translates and scales the set such that the average center is 0, 0 and the average size is 1.0. | |
double | originX () const |
Returns the origin's x. | |
double | originY () const |
Returns the origin's y. | |
void | rotateTo (const ProcrustesPointSet &other) |
Rotates the point set so it fits somehow on other . | |
double | scale () const |
Returns the scale factor. | |
void | set (int i, double x, double y) |
Sets i'th coordinate. | |
Private Attributes | |
double | m_angle |
If rotated, the angle. | |
bool | m_flipped |
int | m_numPoints |
Number of points. | |
double | m_originX |
Original average center's x when normalized. | |
double | m_originY |
Original average center's y when normalized. | |
double | m_scale |
Scale factor. | |
double * | m_x |
X coordinates. | |
double * | m_y |
Y coordinates. | |
Definition at line 38 of file ProcrustesSubLayout.h.
|
explicit |
Constructor for allocating memory for numPoints
points.
ogdf::ProcrustesPointSet::~ProcrustesPointSet | ( | ) |
Destructor.
|
inline |
Returns the rotation angle.
Definition at line 77 of file ProcrustesSubLayout.h.
double ogdf::ProcrustesPointSet::compare | ( | const ProcrustesPointSet & | other | ) | const |
Calculates a value how good the two point sets match.
Returns i'th
x-coordinate.
Definition at line 62 of file ProcrustesSubLayout.h.
Returns i'th
y-coordinate.
Definition at line 65 of file ProcrustesSubLayout.h.
|
inline |
Returns true if the point set is flipped by y coord.
Definition at line 80 of file ProcrustesSubLayout.h.
Translates and scales the set such that the average center is 0, 0 and the average size is 1.0.
|
inline |
Returns the origin's x.
Definition at line 68 of file ProcrustesSubLayout.h.
|
inline |
Returns the origin's y.
Definition at line 71 of file ProcrustesSubLayout.h.
void ogdf::ProcrustesPointSet::rotateTo | ( | const ProcrustesPointSet & | other | ) |
Rotates the point set so it fits somehow on other
.
|
inline |
Returns the scale factor.
Definition at line 74 of file ProcrustesSubLayout.h.
Sets i'th
coordinate.
Definition at line 56 of file ProcrustesSubLayout.h.
|
private |
If rotated, the angle.
Definition at line 102 of file ProcrustesSubLayout.h.
|
private |
Definition at line 104 of file ProcrustesSubLayout.h.
|
private |
Number of points.
Definition at line 84 of file ProcrustesSubLayout.h.
|
private |
Original average center's x when normalized.
Definition at line 93 of file ProcrustesSubLayout.h.
|
private |
Original average center's y when normalized.
Definition at line 96 of file ProcrustesSubLayout.h.
|
private |
Scale factor.
Definition at line 99 of file ProcrustesSubLayout.h.
|
private |
X coordinates.
Definition at line 87 of file ProcrustesSubLayout.h.
|
private |
Y coordinates.
Definition at line 90 of file ProcrustesSubLayout.h.