Documentation
Tools for embedded systems
|
One-dimensional interpolation class. More...
Data Structures | |
struct | qInterp1_t |
A 1D interpolation object. More... | |
Enumerations | |
enum | qInterp1Method_t { QINTERP1_NEXT , QINTERP1_PREVIOUS , QINTERP1_NEAREST , QINTERP1_LINEAR , QINTERP1_SINE , QINTERP1_CUBIC , QINTERP1_HERMITE , QINTERP1_SPLINE , QINTERP1_CONSTRAINED_SPLINE , QINTERP1_MAX } |
An enum with all the available interpolation methods. More... | |
Functions | |
int | qInterp1_Setup (qInterp1_t *const i, const float *const xTable, const float *const yTable, const size_t sizeTable) |
Setup and initialize the 1D interpolation instance. | |
int | qInterp1_SetData (qInterp1_t *const i, const float *const xTable, const float *const yTable, const size_t sizeTable) |
Set the data table for the 1D interpolation instance. | |
int | qInterp1_SetMethod (qInterp1_t *const i, const qInterp1Method_t m) |
Specify the interpolation method to use. | |
float | qInterp1_Get (qInterp1_t *const i, const float x) |
Interpolate input point x to determine the value of y at the points xi using the current method. If value is beyond the endpoints, extrapolation is performed using the current method. | |
One-dimensional interpolation class.
enum qInterp1Method_t |
An enum with all the available interpolation methods.
float qInterp1_Get | ( | qInterp1_t *const | i, |
const float | x ) |
Interpolate input point x to determine the value of y at the points xi using the current method. If value is beyond the endpoints, extrapolation is performed using the current method.
[in] | i | A pointer to the interpolation instance. |
[in] | x | The input point. |
int qInterp1_SetData | ( | qInterp1_t *const | i, |
const float *const | xTable, | ||
const float *const | yTable, | ||
const size_t | sizeTable ) |
Set the data table for the 1D interpolation instance.
[in] | i | A pointer to the interpolation instance. |
[in] | xTable | An array of size sizeTable with the x points sorted in ascending order. |
[in] | yTable | An array of size sizeTable with the y points. |
[in] | sizeTable | The number of points in xTable yTable |
int qInterp1_SetMethod | ( | qInterp1_t *const | i, |
const qInterp1Method_t | m ) |
Specify the interpolation method to use.
[in] | i | A pointer to the interpolation instance. |
[in] | m | The interpolation method. |
int qInterp1_Setup | ( | qInterp1_t *const | i, |
const float *const | xTable, | ||
const float *const | yTable, | ||
const size_t | sizeTable ) |
Setup and initialize the 1D interpolation instance.
[in] | i | A pointer to the interpolation instance. |
[in] | xTable | An array of size sizeTable with the x points sorted in ascending order. |
[in] | yTable | An array of size sizeTable with the y points. |
[in] | sizeTable | The number of points in xTable yTable |