17#ifndef __math_chebyshev_h__
18#define __math_chebyshev_h__
29 template <
typename T>
inline T
eval (
const double* coef,
const int order,
const T lower,
const T upper,
const T x)
31 T y = (2.0*x - lower - upper) / (upper - lower);
33 for (
int i =
order; i >= 1; i--) {
35 d = 2.0*y*d - dd + coef[i];
38 return (y*d - dd + 0.5 * coef[0]);
T eval(const double *coef, const int order, const T lower, const T upper, const T x)
vector< size_t > order(const HeaderType &header, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
sort range of axes with respect to their absolute stride.