aimstil  5.0.5
interpolationTraits.h
Go to the documentation of this file.
1 #ifndef TIL_INTERPOLATION_TRAITS_H
2 #define TIL_INTERPOLATION_TRAITS_H
3 
4 // includes from TIL library
10 
11 namespace til
12 {
13 
14  // TODO: shouldn'it be interpolation_traits::sample_size, rather than interpolationssamplesize::value?... pros/cons?
15 
16  // Output precision of interpolation
17  // TODO: use traits on value_type rather than fixed precision...
18  typedef double t_interp;
19 
22  template < typename Interpolator >
24 
25 
26  // A macro to define specialization of interpolationSampleSize.
27  // NB: to be undefined at the end of the definitions
28 #define DEFINE_INTSAMPLESIZE_SPECIALIZATION(interpolator, sampleSize) \
29  template <> \
30  struct InterpolationSampleSize< interpolator > \
31  { \
32  static const int value = (sampleSize); \
33  }; \
34 
35  //DEFINE_INTSAMPLESIZE_SPECIALIZATION(CatmullRomInterpolation, 4);
36  //DEFINE_INTSAMPLESIZE_SPECIALIZATION(CubicSplineInterpolation, 4);
37  //DEFINE_INTSAMPLESIZE_SPECIALIZATION(KeysInterpolation, 6);
38  //DEFINE_INTSAMPLESIZE_SPECIALIZATION(Lagrange4Interpolation, 4);
39  //DEFINE_INTSAMPLESIZE_SPECIALIZATION(LinearInterpolation, 2);
40 
41  template < typename T >
43  { static const int value = 4; };
44 
45  template < typename T >
47  { static const int value = 4; };
48 
49  template < typename T >
51  { static const int value = 6; };
52 
53  template < typename T >
55  { static const int value = 4; };
56 
57  template < typename T >
59  { static const int value = 2; };
60 
61 #undef DEFINE_INTSAMPLESIZE_SPECIALIZATION
62 
63 
64 
65 
66 } // namespace til
67 
68 
69 #endif
70 
Interpolation using the Catmull-Rom polynomial.
Interpolation using Lagrange polynomials of order 4.
Traits for interpolators representing the number of sample points each of these schemes use...
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition: Accumulator.h:10
Linear interpolation between two values.
Interpolation using Keys polynomial.
double t_interp