Scope
scope::LUT_function< LBound, UBound, TResult, TArg > Class Template Reference

#include <lut.h>

Public Member Functions

 LUT_function (std::function< TResult(double)> f, const double &coeff=1)
 
const TResult & operator() (TArg i) const
 

Protected Attributes

std::array< TResult, UBound-LBound+1 > lut_array
 
std::array< TResult, UBound-LBound+1 >::iterator lut
 

Detailed Description

template<int32_t LBound = 0, int32_t UBound = 255, class TResult = uint8_t, class TArg = uint16_t>
class scope::LUT_function< LBound, UBound, TResult, TArg >

class for generating a lookup table by providing a function to the constructor

Definition at line 15 of file lut.h.

Constructor & Destructor Documentation

template<int32_t LBound = 0, int32_t UBound = 255, class TResult = uint8_t, class TArg = uint16_t>
scope::LUT_function< LBound, UBound, TResult, TArg >::LUT_function ( std::function< TResult(double)>  f,
const double &  coeff = 1 
)
inlineexplicit

Fills lookup table with function f.

Parameters
[in]ffunction that takes a double returns looked-up value (TResult, usually uint8_t)
[in]coeffmultiplies taken double

Definition at line 28 of file lut.h.

Member Function Documentation

template<int32_t LBound = 0, int32_t UBound = 255, class TResult = uint8_t, class TArg = uint16_t>
const TResult& scope::LUT_function< LBound, UBound, TResult, TArg >::operator() ( TArg  i) const
inline
Returns
looked-up value for i

Definition at line 35 of file lut.h.

Member Data Documentation

template<int32_t LBound = 0, int32_t UBound = 255, class TResult = uint8_t, class TArg = uint16_t>
std::array<TResult, UBound - LBound + 1> scope::LUT_function< LBound, UBound, TResult, TArg >::lut_array
protected

the lookup table

Definition at line 19 of file lut.h.

template<int32_t LBound = 0, int32_t UBound = 255, class TResult = uint8_t, class TArg = uint16_t>
std::array<TResult, UBound - LBound + 1>::iterator scope::LUT_function< LBound, UBound, TResult, TArg >::lut
protected

iterator to beginning of lookup table

Definition at line 22 of file lut.h.


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