Class interp_nearest_neigh (o2scl)¶
-
template<class vec_t, class vec2_t = vec_t, class fp_t = double>
class interp_nearest_neigh : public o2scl::interp_base<vec_t, vec_t, double>¶ Nearest-neighbor interpolation.
Nearest interpolation requires no calls to allocate() or free() as there is no internal storage required.
Public Functions
-
inline interp_nearest_neigh()¶
-
inline virtual ~interp_nearest_neigh()¶
-
inline virtual void set(size_t size, const vec_t &x, const vec2_t &y)¶
Initialize interpolation routine.
-
inline virtual fp_t deriv(fp_t x0) const¶
Give the value of the derivative \( y^{\prime}(x=x_0) \) .
-
inline virtual fp_t deriv2(fp_t x0) const¶
Give the value of the second derivative \( y^{\prime \prime}(x=x_0) \) (always zero)
-
inline virtual fp_t integ(fp_t a, fp_t b) const¶
Give the value of the integral \( \int_a^{b}y(x)~dx \) .
-
inline virtual const char *type() const¶
Return the type,
"interp_nearest_neigh"
.
Private Functions
-
interp_nearest_neigh(const interp_nearest_neigh<vec_t, vec2_t, fp_t>&)¶
-
interp_nearest_neigh<vec_t, vec2_t, fp_t> &operator=(const interp_nearest_neigh<vec_t, vec2_t, fp_t>&)¶
-
inline interp_nearest_neigh()¶