Documentation
Tools for embedded systems
|
A 1D interpolation object. More...
#include <interp1.hpp>
Public Member Functions | |
virtual | ~interp1 () |
interp1 (const real_t *const xTable, const real_t *const yTable, const size_t sizeTable) | |
Constructor for the 1D interpolation instance. | |
template<size_t sizeTable> | |
interp1 (real_t(&xTable)[sizeTable], real_t(&yTable)[sizeTable]) | |
Constructor for the 1D interpolation instance. | |
bool | setData (const real_t *const xTable, const real_t *const yTable, const size_t sizeTable) |
Set the data table for the 1D interpolation instance. | |
template<size_t sizeTable> | |
bool | setData (real_t(&xTable)[sizeTable], real_t(&yTable)[sizeTable]) |
Set the data for the 1D interpolation instance. | |
bool | setMethod (const interp1Method m) noexcept |
Specify the interpolation method to use. | |
template<typename T > | |
real_t | get (const T x) noexcept |
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. | |
A 1D interpolation object.
|
inlinevirtual |
|
inline |
Constructor for the 1D 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 |
|
inline |
Constructor for the 1D 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. |
|
inlinenoexcept |
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] | x | The input point. |
The
interpolated-extrapolated y value.
|
inline |
Set the data table for the 1D 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 |
|
inline |
Set the data for the 1D 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. |
|
noexcept |
Specify the interpolation method to use.
[in] | m | The interpolation method. |
true
on success otherwise false
.