#include <ogdf/misclayout/ProcrustesSubLayout.h>
Public Member Functions | |
| ProcrustesPointSet (int numPoints) | |
| Constructor for allocating mem for numPoints points. More... | |
| ~ProcrustesPointSet () | |
| Destructor which frees mem. 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 ith x-coordinate More... | |
| double | getY (int i) const |
| returns ith 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 avg center is 0, 0 and the avg size is 1.0 More... | |
| double | originX () const |
| returns the origins x More... | |
| double | originY () const |
| returns the origins 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 ith coordinate More... | |
Private Attributes | |
| double | m_angle |
| if rotated, the angle More... | |
| bool | m_flipped |
| if flipped then this is true More... | |
| int | m_numPoints |
| The number of points. More... | |
| double | m_originX |
| the original avg center's x when normalized More... | |
| double | m_originY |
| the original avg center's y when normalized More... | |
| double | m_scale |
| the scale factor More... | |
| double * | m_x |
| x coordinates More... | |
| double * | m_y |
| y coordinates More... | |
Definition at line 39 of file ProcrustesSubLayout.h.
|
explicit |
Constructor for allocating mem for numPoints points.
| ogdf::ProcrustesPointSet::~ProcrustesPointSet | ( | ) |
Destructor which frees mem.
|
inline |
returns the rotation angle
Definition at line 95 of file ProcrustesSubLayout.h.
| double ogdf::ProcrustesPointSet::compare | ( | const ProcrustesPointSet & | other | ) | const |
calculates a value how good the two point sets match
|
inline |
returns ith x-coordinate
Definition at line 65 of file ProcrustesSubLayout.h.
|
inline |
returns ith y-coordinate
Definition at line 71 of file ProcrustesSubLayout.h.
|
inline |
returns true if the point set is flipped by y coord
Definition at line 101 of file ProcrustesSubLayout.h.
| void ogdf::ProcrustesPointSet::normalize | ( | bool | flip = false | ) |
translates and scales the set such that the avg center is 0, 0 and the avg size is 1.0
|
inline |
returns the origins x
Definition at line 77 of file ProcrustesSubLayout.h.
|
inline |
returns the origins y
Definition at line 83 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 89 of file ProcrustesSubLayout.h.
|
inline |
sets ith coordinate
Definition at line 58 of file ProcrustesSubLayout.h.
|
private |
if rotated, the angle
Definition at line 126 of file ProcrustesSubLayout.h.
|
private |
if flipped then this is true
Definition at line 129 of file ProcrustesSubLayout.h.
|
private |
The number of points.
Definition at line 108 of file ProcrustesSubLayout.h.
|
private |
the original avg center's x when normalized
Definition at line 117 of file ProcrustesSubLayout.h.
|
private |
the original avg center's y when normalized
Definition at line 120 of file ProcrustesSubLayout.h.
|
private |
the scale factor
Definition at line 123 of file ProcrustesSubLayout.h.
|
private |
x coordinates
Definition at line 111 of file ProcrustesSubLayout.h.
|
private |
y coordinates
Definition at line 114 of file ProcrustesSubLayout.h.