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

Interpolation using Lagrange polynomials of order 4. More...

#include <til/LagrangeInterpolation.h>

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

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 Lagrange4 method. More...
 

Detailed Description

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

Interpolation using Lagrange polynomials of order 4.

Computes the Lagrange 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 Lagrange polynomial is the only third order polynomial fitting all four points.

Definition at line 22 of file LagrangeInterpolation.h.

Member Function Documentation

◆ compute()

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

Returns the interpolated value of four numbers using Lagrange4 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

Definition at line 32 of file LagrangeInterpolation.h.


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