Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::ProcrustesPointSet Class Reference

#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...
 

Detailed Description

Definition at line 38 of file ProcrustesSubLayout.h.

Constructor & Destructor Documentation

◆ ProcrustesPointSet()

ogdf::ProcrustesPointSet::ProcrustesPointSet ( int  numPoints)
explicit

Constructor for allocating memory for numPoints points.

◆ ~ProcrustesPointSet()

ogdf::ProcrustesPointSet::~ProcrustesPointSet ( )

Destructor.

Member Function Documentation

◆ angle()

double ogdf::ProcrustesPointSet::angle ( ) const
inline

Returns the rotation angle.

Definition at line 94 of file ProcrustesSubLayout.h.

◆ compare()

double ogdf::ProcrustesPointSet::compare ( const ProcrustesPointSet other) const

Calculates a value how good the two point sets match.

◆ getX()

double ogdf::ProcrustesPointSet::getX ( int  i) const
inline

Returns i'th x-coordinate.

Definition at line 64 of file ProcrustesSubLayout.h.

◆ getY()

double ogdf::ProcrustesPointSet::getY ( int  i) const
inline

Returns i'th y-coordinate.

Definition at line 70 of file ProcrustesSubLayout.h.

◆ isFlipped()

bool ogdf::ProcrustesPointSet::isFlipped ( ) const
inline

Returns true if the point set is flipped by y coord.

Definition at line 100 of file ProcrustesSubLayout.h.

◆ normalize()

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.

◆ originX()

double ogdf::ProcrustesPointSet::originX ( ) const
inline

Returns the origin's x.

Definition at line 76 of file ProcrustesSubLayout.h.

◆ originY()

double ogdf::ProcrustesPointSet::originY ( ) const
inline

Returns the origin's y.

Definition at line 82 of file ProcrustesSubLayout.h.

◆ rotateTo()

void ogdf::ProcrustesPointSet::rotateTo ( const ProcrustesPointSet other)

Rotates the point set so it fits somehow on other.

◆ scale()

double ogdf::ProcrustesPointSet::scale ( ) const
inline

Returns the scale factor.

Definition at line 88 of file ProcrustesSubLayout.h.

◆ set()

void ogdf::ProcrustesPointSet::set ( int  i,
double  x,
double  y 
)
inline

Sets i'th coordinate.

Definition at line 57 of file ProcrustesSubLayout.h.

Member Data Documentation

◆ m_angle

double ogdf::ProcrustesPointSet::m_angle
private

If rotated, the angle.

Definition at line 125 of file ProcrustesSubLayout.h.

◆ m_flipped

bool ogdf::ProcrustesPointSet::m_flipped
private

Definition at line 127 of file ProcrustesSubLayout.h.

◆ m_numPoints

int ogdf::ProcrustesPointSet::m_numPoints
private

Number of points.

Definition at line 107 of file ProcrustesSubLayout.h.

◆ m_originX

double ogdf::ProcrustesPointSet::m_originX
private

Original average center's x when normalized.

Definition at line 116 of file ProcrustesSubLayout.h.

◆ m_originY

double ogdf::ProcrustesPointSet::m_originY
private

Original average center's y when normalized.

Definition at line 119 of file ProcrustesSubLayout.h.

◆ m_scale

double ogdf::ProcrustesPointSet::m_scale
private

Scale factor.

Definition at line 122 of file ProcrustesSubLayout.h.

◆ m_x

double* ogdf::ProcrustesPointSet::m_x
private

X coordinates.

Definition at line 110 of file ProcrustesSubLayout.h.

◆ m_y

double* ogdf::ProcrustesPointSet::m_y
private

Y coordinates.

Definition at line 113 of file ProcrustesSubLayout.h.


The documentation for this class was generated from the following file: