MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
marvin::math::windows::PrecomputedWindow< SampleType, NumPoints > Class Template Referencefinal

Helper class for cacheing a window function in a lookup table. More...

#include <marvin_Windows.h>

Public Member Functions

 PrecomputedWindow (std::array< SampleType, NumPoints > &&lut)
 
SampleType operator() (SampleType proportion) const
 

Detailed Description

template<marvin::FloatType SampleType, size_t NumPoints>
class marvin::math::windows::PrecomputedWindow< SampleType, NumPoints >

Helper class for cacheing a window function in a lookup table.

Constructor & Destructor Documentation

◆ PrecomputedWindow()

template<marvin::FloatType SampleType, size_t NumPoints>
marvin::math::windows::PrecomputedWindow< SampleType, NumPoints >::PrecomputedWindow ( std::array< SampleType, NumPoints > && lut)
inlineexplicit

Constructs a PrecomputedWindow, from a preallocated array of points.

Parameters
lutA precomputed array containing the window function you want to store.

Member Function Documentation

◆ operator()()

template<marvin::FloatType SampleType, size_t NumPoints>
SampleType marvin::math::windows::PrecomputedWindow< SampleType, NumPoints >::operator() ( SampleType proportion) const
inlinenodiscard

Retrieves a sample a certain (0 to 1) proportion into the LUT. Will use linear interpolation between the existing points to achieve this.

Parameters
proportionA 0 to 1 propertion into the LUT.
Returns
The (interpolated) sample in the window at the given proportion.

The documentation for this class was generated from the following file: