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

Cubic interpolation. More...

#include <til/CubicSplineInterpolation.h>

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

Public Types

typedef CubicSplineInterpolation< T > Self
 

Static Public Member Functions

static T compute (T f1, T f2, T f3, T f4, T x)
 Returns the cubic spline interpolation value of four numbers, given their four spline coefficients. More...
 

Detailed Description

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

Cubic interpolation.

Definition at line 12 of file CubicSplineInterpolation.h.

Member Typedef Documentation

◆ Self

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

Definition at line 16 of file CubicSplineInterpolation.h.

Member Function Documentation

◆ compute()

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

Returns the cubic spline interpolation value of four numbers, given their four spline coefficients.

The cubic spline coefficients of the data to interpolate therefore must have been previoulsy computed. To do that, one technique is to use recursive filtering, see e.g. til::cubicSplineCoefficients for images. The cubic spline is 3/4*x^3-3/2*x^2+1, 0<x<1 -1/4*x^3+3/2*x^2-3*x+2, 1<x<2

Parameters
f1Cubic spline coefficient assumed to lie at position -1
f2Cubic spline coefficient assumed to lie at position 0
f3Cubic spline coefficient assumed to lie at position 1
f4Cubic spline coefficient assumed to lie at position 2
xThe interpolated value at position x, supposed to lie between 0 and 1 (no checking on that)

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