00001
00002
00008 #if !defined(__numerical_interpolation_simplex_h__)
00009 #define __numerical_interpolation_simplex_h__
00010
00011 #include "../defs.h"
00012
00013 #include "../../ads/array/FixedArray.h"
00014
00015 BEGIN_NAMESPACE_NUMERICAL
00016
00046
00047
00065 template <int N, int M, typename T, typename F>
00066 const F&
00067 linear_interpolation( const ads::FixedArray< M+1, ads::FixedArray<N,T> >&
00068 positions,
00069 const ads::FixedArray< M+1, F >& values,
00070 const ads::FixedArray<N,T>& location );
00071
00072
00073
00074
00075
00077
00078 template <typename T, typename F>
00079 const F&
00080 linear_interpolation( const T a, T b, const F& alpha, const F& beta, T x );
00081
00083
00084 template <typename T, typename F>
00085 inline
00086 const F&
00087 linear_interpolation( const ads::FixedArray< 2, T >& positions,
00088 const ads::FixedArray< 2, F >& values,
00089 const T location )
00090 {
00091 return linear_interpolation( positions[0], positions[1],
00092 values[0], values[1], location );
00093 }
00094
00096
00097 template <typename T, typename F>
00098 const F&
00099 linear_interpolation( const ads::FixedArray<2,T>& a,
00100 const ads::FixedArray<2,T>& b,
00101 const F& alpha, const F& beta,
00102 const ads::FixedArray<2,T>& x );
00103
00104
00105
00106
00107
00108
00109
00111
00112 template <typename T, typename F>
00113 const F&
00114 linear_interpolation( const ads::FixedArray<2,T>& a,
00115 const ads::FixedArray<2,T>& b,
00116 const ads::FixedArray<2,T>& c,
00117 const F& alpha, const F& beta, const F& gamma,
00118 const ads::FixedArray<2,T>& x );
00119
00121
00122 template <typename T, typename F>
00123 const F&
00124 linear_interpolation( const ads::FixedArray<3,T>& a,
00125 const ads::FixedArray<3,T>& b,
00126 const ads::FixedArray<3,T>& c,
00127 const F& alpha, const F& beta, const F& gamma,
00128 const ads::FixedArray<3,T>& x );
00129
00130
00131
00132
00133
00134
00135
00137
00138 template <typename T, typename F>
00139 const F&
00140 linear_interpolation( const ads::FixedArray<3,T>& a,
00141 const ads::FixedArray<3,T>& b,
00142 const ads::FixedArray<3,T>& c,
00143 const ads::FixedArray<3,T>& d,
00144 const F& alpha, const F& beta,
00145 const F& gamma, const F& delta,
00146 const ads::FixedArray<3,T>& x );
00147
00148 END_NAMESPACE_NUMERICAL
00149
00150 #define __numerical_interpolation_simplex_ipp__
00151 #include "simplex.ipp"
00152 #undef __numerical_interpolation_simplex_ipp__
00153
00154 #endif