Zephyr Scientific Library (zscilib)
|
Go to the documentation of this file.
21 #ifndef ZEPHYR_INCLUDE_ZSL_INTERP_H_
22 #define ZEPHYR_INCLUDE_ZSL_INTERP_H_
int zsl_interp_lin_y(struct zsl_interp_xy *xy1, struct zsl_interp_xy *xy3, zsl_real_t x2, zsl_real_t *y2)
Linear (AKA 'piecewise linear') interpolation for Y between two points, based on zsl_real_ts.
int zsl_interp_lin_x(struct zsl_interp_xy *xy1, struct zsl_interp_xy *xy3, zsl_real_t y2, zsl_real_t *x2)
Linear (AKA 'piecewise linear') interpolation for X between two points, based on zsl_real_ts.
int zsl_interp_cubic_arr(struct zsl_interp_xyc xyc[], size_t n, zsl_real_t x, zsl_real_t *y)
Natural cubic spline interpolation between two points, based on zsl_real_ts.
int zsl_interp_nn(struct zsl_interp_xy *xy1, struct zsl_interp_xy *xy3, zsl_real_t x2, zsl_real_t *y2)
Nearest neighbour (AKA 'piecewise constant') interpolation based on zsl_real_ts.
int zsl_interp_cubic_calc(struct zsl_interp_xyc xyc[], size_t n, zsl_real_t yp1, zsl_real_t ypn)
Calculates xyc[n].y2 for natural cubic spline interpolation, based on the assigned xyc[n]....
XY struct for cubic spline interpolation.
int zsl_interp_lerp(zsl_real_t v0, zsl_real_t v1, zsl_real_t t, zsl_real_t *v)
Calculates a number between two numbers using linear interpolation, where 't' is the interpolation fa...
zsl_real_t y2
Second derivative from the spline.
int zsl_interp_find_x(struct zsl_interp_xy xy[], size_t n, zsl_real_t x, int *idx)
Uses bisection to search the zsl_interp_xy array for the closest array position to 'x',...
API header file for zscilib.
int zsl_interp_nn_arr(struct zsl_interp_xy xy[], size_t n, zsl_real_t x, zsl_real_t *y)
Nearest neighbour (AKA 'piecewise constant') interpolation based on an array of zsl_real_ts.
int zsl_interp_lin_y_arr(struct zsl_interp_xy xy[], size_t n, zsl_real_t x, zsl_real_t *y)
Linear (AKA 'piecewise linear') interpolation for Y between two points, based on zsl_real_ts.
XY struct for nearest neighbour and linear interpolation.