1 #ifndef TIL_LAGRANGE_INTERPOLATION_H 2 #define TIL_LAGRANGE_INTERPOLATION_H 21 template <
typename T >
23 :
public Interpolator_label
40 return (((3*(f2-f3)+f4-f1)/6.0*x+((f1+f3)/2.0-f2))*x+(6*f3-2*f1-3*f2-f4)/6.0)*x+f2;
Interpolation using Lagrange polynomials of order 4.
Belongs to package Box Do not include directly, include til/Box.h instead.
static T compute(T f1, T f2, T f3, T f4, T x)
Returns the interpolated value of four numbers using Lagrange4 method.
General macros, definitions and functions.
Defines empty classes that serves as labels.