1 #ifndef INTERPOLANT_IMPL_H
2 #define INTERPOLANT_IMPL_H
39 template<
template<
class>
class Func,
class Type >
42 interpolate_derivative(interpolate_derivative)
48 func_diffn->set_param_from_func(func);
54 template<
template<
class>
class Func,
class Type >
62 func_diffn->set_param_from_func(func);
194 return func->operator()(x);
258 double x_step = x /
step;
272 double x_step = x /
step;
289 : interpolant(interpolant),
p_(p),
tol_(tol) {}
291 inline double p() {
return p_;}
299 return std::pow(a,
p_);
315 : interpolant(interpolant),
p_(p),
tol_(tol) {}
317 inline double p() {
return p_;}
324 double a = std::abs(f.first - g.first) / (std::abs(f.first) +
tol_)
325 + std::abs(f.second - g.second) / (std::abs(f.second) +
tol_);
327 return std::pow(a,
p_);
340 template<
template<
class>
class Func,
class Type >
348 func_diffn->set_param_from_func(func);
355 template<
template<
class>
class Func,
class Type >
358 interpolate_derivative(interpolate_derivative),
359 explicit_interpolant(NULL),
366 func_diffn->set_param_from_func(func);
383 template<
class TType>
385 : func_impl(&func_impl),
fix_(fix), fix_val(fix_val) {}
415 #endif //INTERPOLATION_IMPL_H