aimstil  5.0.5
til::CatmullRomInterpolation< T > Class Template Reference

Interpolation using the Catmull-Rom polynomial. More...

#include <til/CatmullRomInterpolation.h>

Inheritance diagram for til::CatmullRomInterpolation< T >:
Collaboration diagram for til::CatmullRomInterpolation< T >:

Public Types

typedef CatmullRomInterpolation Self
 

Static Public Member Functions

static T compute (T f1, T f2, T f3, T f4, T x)
 Returns the interpolated value of four numbers using the Catmull-Rom method. More...
 

Detailed Description

template<typename T>
class til::CatmullRomInterpolation< T >

Interpolation using the Catmull-Rom polynomial.

Computes the Catmull-Rom interpolation of the sequence (f1, f2, f3, f4) (supposed to be equally spaced and at position (-1, 0, 1, 2)). 'x' is the position of the point where we want an interpolated value, and has to be in the range [0, 1].

The Catmull-Rom spline is 3/2.x^3-5/2.x^2+1, -1/2.x^3 + 5/2.x^2-4.x+2. It it the only 3rd order interpolating spline of support of length 4 that is C^1 and has no 2nd order moment. It has been implemented using the factorization of (Meijering03) that needs the computation of only two cubic polynomials per point.

Definition at line 33 of file CatmullRomInterpolation.h.

Member Typedef Documentation

◆ Self

template<typename T >
typedef CatmullRomInterpolation til::CatmullRomInterpolation< T >::Self

Definition at line 37 of file CatmullRomInterpolation.h.

Member Function Documentation

◆ compute()

template<typename T >
static T til::CatmullRomInterpolation< T >::compute ( f1,
f2,
f3,
f4,
x 
)
inlinestatic

Returns the interpolated value of four numbers using the Catmull-Rom method.

Parameters
f1Value assumed to lie at position -1
f2Value assumed to lie at position 0
f3Value assumed to lie at position 1
f4Value assumed to lie at position 2
xThe interpolated value at position x

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