SPH
Public Member Functions | List of all members
Lut< TValue, TScalar > Class Template Reference

Callable representing a generic R->T function, approximated using look-up table. More...

#include <Lut.h>

Inheritance diagram for Lut< TValue, TScalar >:
Noncopyable

Public Member Functions

 Lut ()=default
 
 Lut (const Interval range, Array< TValue > &&data)
 
template<typename TFunction >
 Lut (const Interval range, const Size resolution, TFunction &&func)
 
INLINE TValue operator() (const TScalar x) const
 
LutIterator< TValue, TScalar > begin () const
 Returns an iterator accessing tabulated values. More...
 
LutIterator< TValue, TScalar > end () const
 Returns an iterator accessing tabulated values. More...
 
Size size () const
 Returns the number of tabulated value. More...
 
Interval getRange () const
 Returns the definition interval of the function. More...
 
Lut derivative () const
 Computes the derivative of the function. More...
 
Lut integral (const Float x0, const Float y0) const
 Computes the indefinite integral of the function. More...
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

template<typename TValue, typename TScalar>
class Lut< TValue, TScalar >

Callable representing a generic R->T function, approximated using look-up table.

Definition at line 61 of file Lut.h.

Constructor & Destructor Documentation

◆ Lut() [1/3]

template<typename TValue , typename TScalar >
Lut< TValue, TScalar >::Lut ( )
default

◆ Lut() [2/3]

template<typename TValue , typename TScalar >
Lut< TValue, TScalar >::Lut ( const Interval  range,
Array< TValue > &&  data 
)
inline

Definition at line 69 of file Lut.h.

◆ Lut() [3/3]

template<typename TValue , typename TScalar >
template<typename TFunction >
Lut< TValue, TScalar >::Lut ( const Interval  range,
const Size  resolution,
TFunction &&  func 
)
inline

Definition at line 74 of file Lut.h.

Member Function Documentation

◆ begin()

template<typename TValue , typename TScalar >
LutIterator<TValue, TScalar> Lut< TValue, TScalar >::begin ( ) const
inline

Returns an iterator accessing tabulated values.

Definition at line 100 of file Lut.h.

◆ derivative()

template<typename TValue , typename TScalar >
Lut Lut< TValue, TScalar >::derivative ( ) const
inline

Computes the derivative of the function.

Definition at line 120 of file Lut.h.

◆ end()

template<typename TValue , typename TScalar >
LutIterator<TValue, TScalar> Lut< TValue, TScalar >::end ( ) const
inline

Returns an iterator accessing tabulated values.

Definition at line 105 of file Lut.h.

◆ getRange()

template<typename TValue , typename TScalar >
Interval Lut< TValue, TScalar >::getRange ( ) const
inline

Returns the definition interval of the function.

Definition at line 115 of file Lut.h.

◆ integral()

template<typename TValue , typename TScalar >
Lut Lut< TValue, TScalar >::integral ( const Float  x0,
const Float  y0 
) const
inline

Computes the indefinite integral of the function.

The integration constant is set so that the integral at x0 has value y0.

Definition at line 133 of file Lut.h.

◆ operator()()

template<typename TValue , typename TScalar >
INLINE TValue Lut< TValue, TScalar >::operator() ( const TScalar  x) const
inline
Todo:
possibly make linear interpolation rather than just const value

Definition at line 83 of file Lut.h.

◆ size()

template<typename TValue , typename TScalar >
Size Lut< TValue, TScalar >::size ( ) const
inline

Returns the number of tabulated value.

Definition at line 110 of file Lut.h.


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