isce3 0.25.0
Loading...
Searching...
No Matches
LUT1d< T > Class Template Reference

Data structure to hold a 1D Lookup table. More...

#include <LUT1d.h>

Public Types

using ArrayXt = Eigen::Array<T, Eigen::Dynamic, 1>
 

Public Member Functions

 LUT1d ()
 Default constructor.
 
 LUT1d (T refValue)
 Constructor with a constant reference value.
 
 LUT1d (size_t size)
 Constructor with size.
 
 LUT1d (const std::valarray< double > &coords, const std::valarray< T > &values, bool extrapolate=false)
 Constructor with coordinates and values.
 
 LUT1d (const LUT1d< T > &lut)
 Copy constructor.
 
LUT1d & operator= (const LUT1d< T > &lut)
 Assignment operator.
 
std::valarray< double > & coords ()
 Get a reference to the coordinates.
 
const std::valarray< double > & coords () const
 Get a read-only reference to the coordinates.
 
void coords (const std::valarray< double > &c)
 Set the coordinates.
 
std::valarray< T > & values ()
 Get a reference to the coordinates.
 
const std::valarray< T > & values () const
 Get a read-only reference to the values.
 
void values (const std::valarray< T > &v)
 Set the values.
 
bool extrapolate () const
 Get extrapolate flag.
 
void extrapolate (bool flag)
 Set extrapolate flag.
 
bool haveData () const
 Get flag for having data.
 
T refValue () const
 Get reference value.
 
size_t size () const
 Get size of LUT.
 
T eval (double x) const
 Evaluate the LUT.
 
ArrayXt eval (const Eigen::Ref< const Eigen::ArrayXd > &x) const
 

Detailed Description

template<typename T>
class LUT1d< T >

Data structure to hold a 1D Lookup table.

Suitable for storing data of the form y = f(x)

Constructor & Destructor Documentation

◆ LUT1d() [1/2]

template<typename T>
isce3::core::LUT1d< T >::LUT1d ( const std::valarray< double > & coords,
const std::valarray< T > & values,
bool extrapolate = false )
inline

Constructor with coordinates and values.

Parameters
[in]coordsValarray for coordinates of LUT
[in]valuesValarray for values of LUT
[in]extrapolateFlag for allowing extrapolation beyond bounds

◆ LUT1d() [2/2]

template<typename T>
isce3::core::LUT1d< T >::LUT1d ( const LUT1d< T > & lut)
inline

Copy constructor.

Parameters
[in]lutLUT1d object to copy from

Member Function Documentation

◆ coords() [1/3]

template<typename T>
std::valarray< double > & isce3::core::LUT1d< T >::coords ( )
inline

Get a reference to the coordinates.

Parameters
[out]coordsReference to valarray for coordinates

◆ coords() [2/3]

template<typename T>
const std::valarray< double > & isce3::core::LUT1d< T >::coords ( ) const
inline

Get a read-only reference to the coordinates.

Parameters
[out]coordsCopy of valarray for coordinates

◆ coords() [3/3]

template<typename T>
void isce3::core::LUT1d< T >::coords ( const std::valarray< double > & c)
inline

Set the coordinates.

Parameters
[in]cInput valarray for coordinates

◆ eval()

template<typename T>
T isce3::core::LUT1d< T >::eval ( double x) const
inline

Evaluate the LUT.

Parameters
[in]xPoint to evaluate the LUT
[out]resultInterpolated value

◆ extrapolate() [1/2]

template<typename T>
bool isce3::core::LUT1d< T >::extrapolate ( ) const
inline

Get extrapolate flag.

Parameters
[out]flagExtrapolation flag

◆ extrapolate() [2/2]

template<typename T>
void isce3::core::LUT1d< T >::extrapolate ( bool flag)
inline

Set extrapolate flag.

Parameters
[in]flagExtrapolation flag

◆ operator=()

template<typename T>
LUT1d & isce3::core::LUT1d< T >::operator= ( const LUT1d< T > & lut)
inline

Assignment operator.

Parameters
[in]lutLUT1d object to assign from

◆ size()

template<typename T>
size_t isce3::core::LUT1d< T >::size ( ) const
inline

Get size of LUT.

Parameters
[out]sizeSize (number of coordinates) of LUT

◆ values() [1/3]

template<typename T>
std::valarray< T > & isce3::core::LUT1d< T >::values ( )
inline

Get a reference to the coordinates.

Parameters
[out]valuesReference to valarray for values

◆ values() [2/3]

template<typename T>
const std::valarray< T > & isce3::core::LUT1d< T >::values ( ) const
inline

Get a read-only reference to the values.

Parameters
[out]valuesCopy of valarray for values

◆ values() [3/3]

template<typename T>
void isce3::core::LUT1d< T >::values ( const std::valarray< T > & v)
inline

Set the values.

Parameters
[in]vInput valarray for values

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

Generated for ISCE3.0 by doxygen 1.13.2.