#include <ogdf/misclayout/ProcrustesSubLayout.h>
Public Member Functions | |
ProcrustesPointSet (int numPoints) | |
Constructor for allocating memory for numPoints points. More... | |
~ProcrustesPointSet () | |
Destructor. More... | |
double | angle () const |
Returns the rotation angle. More... | |
double | compare (const ProcrustesPointSet &other) const |
Calculates a value how good the two point sets match. More... | |
double | getX (int i) const |
Returns i'th x-coordinate. More... | |
double | getY (int i) const |
Returns i'th y-coordinate. More... | |
bool | isFlipped () const |
Returns true if the point set is flipped by y coord. More... | |
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. More... | |
double | originX () const |
Returns the origin's x. More... | |
double | originY () const |
Returns the origin's y. More... | |
void | rotateTo (const ProcrustesPointSet &other) |
Rotates the point set so it fits somehow on other . More... | |
double | scale () const |
Returns the scale factor. More... | |
void | set (int i, double x, double y) |
Sets i'th coordinate. More... | |
Private Attributes | |
double | m_angle |
If rotated, the angle. More... | |
bool | m_flipped |
int | m_numPoints |
Number of points. More... | |
double | m_originX |
Original average center's x when normalized. More... | |
double | m_originY |
Original average center's y when normalized. More... | |
double | m_scale |
Scale factor. More... | |
double * | m_x |
X coordinates. More... | |
double * | m_y |
Y coordinates. More... | |
Definition at line 40 of file ProcrustesSubLayout.h.
|
explicit |
Constructor for allocating memory for numPoints
points.
ogdf::ProcrustesPointSet::~ProcrustesPointSet | ( | ) |
Destructor.
|
inline |
Returns the rotation angle.
Definition at line 79 of file ProcrustesSubLayout.h.
double ogdf::ProcrustesPointSet::compare | ( | const ProcrustesPointSet & | other | ) | const |
Calculates a value how good the two point sets match.
|
inline |
Returns i'th
x-coordinate.
Definition at line 64 of file ProcrustesSubLayout.h.
|
inline |
Returns i'th
y-coordinate.
Definition at line 67 of file ProcrustesSubLayout.h.
|
inline |
Returns true if the point set is flipped by y coord.
Definition at line 82 of file ProcrustesSubLayout.h.
void ogdf::ProcrustesPointSet::normalize | ( | bool | flip = false | ) |
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 70 of file ProcrustesSubLayout.h.
|
inline |
Returns the origin's y.
Definition at line 73 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 76 of file ProcrustesSubLayout.h.
|
inline |
Sets i'th
coordinate.
Definition at line 58 of file ProcrustesSubLayout.h.
|
private |
If rotated, the angle.
Definition at line 104 of file ProcrustesSubLayout.h.
|
private |
Definition at line 106 of file ProcrustesSubLayout.h.
|
private |
Number of points.
Definition at line 86 of file ProcrustesSubLayout.h.
|
private |
Original average center's x when normalized.
Definition at line 95 of file ProcrustesSubLayout.h.
|
private |
Original average center's y when normalized.
Definition at line 98 of file ProcrustesSubLayout.h.
|
private |
Scale factor.
Definition at line 101 of file ProcrustesSubLayout.h.
|
private |
X coordinates.
Definition at line 89 of file ProcrustesSubLayout.h.
|
private |
Y coordinates.
Definition at line 92 of file ProcrustesSubLayout.h.