aimstil
5.0.5
CubicSplineInterpolation.h
Go to the documentation of this file.
1
#ifndef TIL_CUBIC_SPLINE_INTERPOLATION_H
2
#define TIL_CUBIC_SPLINE_INTERPOLATION_H
3
4
// includes from TIL library
5
#include "
til/til_common.h
"
6
#include "
til/labels.h
"
7
8
namespace
til
9
{
11
template
<
typename
T >
12
class
CubicSplineInterpolation
13
:
public
Interpolator_label
14
{
15
public
:
// typedefs
16
typedef
CubicSplineInterpolation<T>
Self
;
17
18
public
:
// static functions
19
29
// NB: with this method, I use 16 muls and 9 adds. By expanding the
30
// equation above and regrouping by coefficients of the polynomial in x,
31
// I get only to 15 muls and 11 adds -- not really better.
32
// Any better factorization?
33
// TODO: use operator() instead
34
inline
static
T
compute
35
(
36
T f1,
37
T f2,
38
T f3,
39
T f4,
40
T x
41
);
42
};
43
}
// namespace til
44
45
46
#include "
til/cubic_spline_interpolation.tpp
"
47
48
49
#endif
50
til
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition:
Accumulator.h:10
til_common.h
General macros, definitions and functions.
labels.h
Defines empty classes that serves as labels.
til::CubicSplineInterpolation::compute
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...
til::CubicSplineInterpolation::Self
CubicSplineInterpolation< T > Self
Definition:
CubicSplineInterpolation.h:16
cubic_spline_interpolation.tpp
til::CubicSplineInterpolation
Cubic interpolation.
Definition:
CubicSplineInterpolation.h:12
til
CubicSplineInterpolation.h
Generated by
1.8.13