philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Spline Class Reference

#include <Spline.h>

Public Member Functions

 Spline (const Matrix< double > &X, const Matrix< double > &Y)
 
 Spline (const Matrix< double > &X, const Matrix< double > &Y, const Matrix< double > &Z)
 
double eval_spline_j (double x_act, size_t j, const Matrix< double > &mi)
 
Matrix< double > curv (double h)
 
void SetAbstractionValue (const Matrix< double > &tx, const Matrix< double > &ty)
 
Matrix< double > operator() (const Matrix< double > &xi)
 
Matrix< double > calculateEquidistant (const Matrix< double > &xi)
 

Private Attributes

Matrix< double > XI
 x-axis support values More...
 
Matrix< double > YI
 y-axis support values More...
 
Matrix< double > ZI
 z-axis support values More...
 
Matrix< double > Tx
 t-Values for x More...
 
Matrix< double > Ty
 t-Values for y More...
 
bool isEquidistant = true
 flag to signalize that support values do not lie equidistant to each other More...
 

Detailed Description

Spline implementation.

Capable of 1D Natural-Cubic-Splines as well as 2/3D Interpolation using approximations.

Constructor & Destructor Documentation

◆ Spline() [1/2]

Spline::Spline ( const Matrix< double > &  X,
const Matrix< double > &  Y 
)
inline

Default constructor

Parameters
Xx-axis support values
Yy-axis support values

◆ Spline() [2/2]

Spline::Spline ( const Matrix< double > &  X,
const Matrix< double > &  Y,
const Matrix< double > &  Z 
)
inline

3D approximation using a b=2 b-spline

Parameters
Xx-axis evaluation values
Yy-axis evaluation values
Zz-axis evaluation values

Member Function Documentation

◆ calculateEquidistant()

Matrix< double > Spline::calculateEquidistant ( const Matrix< double > &  xi)
inline

Calculates natural cubic spline for given input xi

Parameters
xiinput values
Returns

◆ curv()

Matrix< double > Spline::curv ( double  h)
inline

Calculates second derivative on given knot-points

Parameters
hdistance between points
Returns

◆ eval_spline_j()

double Spline::eval_spline_j ( double  x_act,
size_t  j,
const Matrix< double > &  mi 
)
inline

Evaluation of cubic polynomial s_j

Returns

◆ operator()()

Matrix< double > Spline::operator() ( const Matrix< double > &  xi)
inline

Evaluates the spline for given values

Parameters
xiinput values
Returns
evaluated input

◆ SetAbstractionValue()

void Spline::SetAbstractionValue ( const Matrix< double > &  tx,
const Matrix< double > &  ty 
)
inline

Setter for abstraction values t

Parameters
txx-axis
tyy-axis

Member Data Documentation

◆ isEquidistant

bool Spline::isEquidistant = true
private

flag to signalize that support values do not lie equidistant to each other

◆ Tx

Matrix<double> Spline::Tx
private

t-Values for x

◆ Ty

Matrix<double> Spline::Ty
private

t-Values for y

◆ XI

Matrix<double> Spline::XI
private

x-axis support values

◆ YI

Matrix<double> Spline::YI
private

y-axis support values

◆ ZI

Matrix<double> Spline::ZI
private

z-axis support values


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