Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::ProcrustesPointSet Class Reference

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

Detailed Description

Definition at line 39 of file ProcrustesSubLayout.h.

Constructor & Destructor Documentation

◆ ProcrustesPointSet()

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

Constructor for allocating mem for numPoints points.

◆ ~ProcrustesPointSet()

ogdf::ProcrustesPointSet::~ProcrustesPointSet ( )

Destructor which frees mem.

Member Function Documentation

◆ angle()

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

returns the rotation angle

Definition at line 95 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 ith x-coordinate

Definition at line 65 of file ProcrustesSubLayout.h.

◆ getY()

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

returns ith y-coordinate

Definition at line 71 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 101 of file ProcrustesSubLayout.h.

◆ normalize()

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

◆ originX()

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

returns the origins x

Definition at line 77 of file ProcrustesSubLayout.h.

◆ originY()

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

returns the origins y

Definition at line 83 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 89 of file ProcrustesSubLayout.h.

◆ set()

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

sets ith coordinate

Definition at line 58 of file ProcrustesSubLayout.h.

Member Data Documentation

◆ m_angle

double ogdf::ProcrustesPointSet::m_angle
private

if rotated, the angle

Definition at line 126 of file ProcrustesSubLayout.h.

◆ m_flipped

bool ogdf::ProcrustesPointSet::m_flipped
private

if flipped then this is true

Definition at line 129 of file ProcrustesSubLayout.h.

◆ m_numPoints

int ogdf::ProcrustesPointSet::m_numPoints
private

The number of points.

Definition at line 108 of file ProcrustesSubLayout.h.

◆ m_originX

double ogdf::ProcrustesPointSet::m_originX
private

the original avg center's x when normalized

Definition at line 117 of file ProcrustesSubLayout.h.

◆ m_originY

double ogdf::ProcrustesPointSet::m_originY
private

the original avg center's y when normalized

Definition at line 120 of file ProcrustesSubLayout.h.

◆ m_scale

double ogdf::ProcrustesPointSet::m_scale
private

the scale factor

Definition at line 123 of file ProcrustesSubLayout.h.

◆ m_x

double* ogdf::ProcrustesPointSet::m_x
private

x coordinates

Definition at line 111 of file ProcrustesSubLayout.h.

◆ m_y

double* ogdf::ProcrustesPointSet::m_y
private

y coordinates

Definition at line 114 of file ProcrustesSubLayout.h.


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