FireSTARR
Loading...
Searching...
No Matches
fs::util::LookupTable< Fct, IndexDigits, Precision > Class Template Reference

A table initialized using the given function ranging over the number of digits and precision. More...

#include <LookupTable.h>

Collaboration diagram for fs::util::LookupTable< Fct, IndexDigits, Precision >:

Public Member Functions

 LookupTable (LookupTable &&rhs) noexcept=delete
 
 LookupTable (const LookupTable &rhs) noexcept=delete
 
LookupTableoperator= (LookupTable &&rhs) noexcept=delete
 
LookupTableoperator= (const LookupTable &rhs) noexcept=delete
 
constexpr MathSize operator() (const MathSize value) const
 Get result of function lookup table was initialized with for given value.
 

Private Types

using ValuesArray = array<MathSize, pow_int<IndexDigits>(10) * pow_int<Precision>(10)>
 Array with enough space for function called with specific number of digits and precision.
 

Private Member Functions

constexpr ValuesArray makeValues ()
 Call function with range of values with given precision.
 

Private Attributes

const ValuesArray values_
 Array of values from calling function.
 

Detailed Description

template<MathSize(*)(const MathSize) Fct, int IndexDigits = 3, int Precision = 1>
class fs::util::LookupTable< Fct, IndexDigits, Precision >

A table initialized using the given function ranging over the number of digits and precision.

Template Parameters
FctFunction to apply over the range of values
IndexDigitsNumber of digits to use for range of values
PrecisionPrecision in decimal places to use for range of values

Member Function Documentation

◆ makeValues()

template<MathSize(*)(const MathSize) Fct, int IndexDigits = 3, int Precision = 1>
ValuesArray fs::util::LookupTable< Fct, IndexDigits, Precision >::makeValues ( )
inlinenodiscardconstexprprivate

Call function with range of values with given precision.

Returns
Results of function with range of values with given precision

◆ operator()()

template<MathSize(*)(const MathSize) Fct, int IndexDigits = 3, int Precision = 1>
MathSize fs::util::LookupTable< Fct, IndexDigits, Precision >::operator() ( const MathSize value) const
inlinenodiscardconstexpr

Get result of function lookup table was initialized with for given value.

Parameters
valuevalue to get lookup result for
Returns
result of lookup for function at value

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