A one-dimensional lookup table for a given function with a specified resolution.
More...
template<
mono_float(*)(
mono_float) function, size_t resolution>
class vital::OneDimLookup< function, resolution >
A one-dimensional lookup table for a given function with a specified resolution.
The OneDimLookup class precomputes values of a given function at a certain resolution. It then provides a method to retrieve interpolated values using cubic interpolation, allowing for fast, smooth approximations of the function.
- Template Parameters
-
function | A pointer to a function taking a mono_float and returning a mono_float. This function will be sampled to build the lookup table. |
resolution | The number of sample points used to build the lookup table. Higher values provide more accuracy but use more memory. |