template<typename _FunctionT_, typename _OutputT_, typename _InputT_, typename _LutKeyT_>
class BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >
Provide an implementation for a look-up table for a function. Do not use directly, instead use Lut when you are not interested in having the full look-up table or for floating point, or use FullLut for 8bits and 16bits when you want to have a full Lut.
struct MyFunction {
inline static int compute(int i)
{
return 1-i;
}
}
Definition at line 32 of file lut.h.
template<typename _FunctionT_ , typename _OutputT_ , typename _InputT_ , typename _LutKeyT_ >
| void BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::init |
( |
| ) |
|
|
inlineprivate |
Initialization of the table.
Definition at line 37 of file lut.h.
38 {
41 for(
int i = 0; i <
size; ++i)
42 {
44 }
45 }
int size(const Forest< T > &forest)
References BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_function, BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_key, and BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_table.
template<typename _FunctionT_ , typename _OutputT_ , typename _InputT_ , typename _LutKeyT_ >
| _OutputT_ BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::operator() |
( |
_InputT_ | i | ) |
const |
|
inline |
- Returns
- the function value for parameter
i
Definition at line 63 of file lut.h.
References BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_function, BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_key, and BaseLut< _FunctionT_, _OutputT_, _InputT_, _LutKeyT_ >::m_table.