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 >
13  : public Interpolator_label
14  {
15  public: // typedefs
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 
47 
48 
49 #endif
50 
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition: Accumulator.h:10
General macros, definitions and functions.
Defines empty classes that serves as labels.
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...
CubicSplineInterpolation< T > Self