isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
isce3::core::LUT1d< class > Class Template Reference

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

#include <LUT1d.h>

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. More...
 
 LUT1d (const LUT1d< T > &lut)
 Copy constructor. More...
 
LUT1d & operator= (const LUT1d< T > &lut)
 Assignment operator. More...
 
 LUT1d (const LUT2d< T > &lut2d)
 Constructor from an LUT2d (values averaged in y-direction) More...
 
LUT1d & operator= (const LUT2d< T > &lut2d)
 Assignment operator from an LUT2d (values averaged in y-direction) More...
 
std::valarray< double > & coords ()
 Get a reference to the coordinates. More...
 
const std::valarray< double > & coords () const
 Get a read-only reference to the coordinates. More...
 
void coords (const std::valarray< double > &c)
 Set the coordinates. More...
 
std::valarray< T > & values ()
 Get a reference to the coordinates. More...
 
const std::valarray< T > & values () const
 Get a read-only reference to the values. More...
 
void values (const std::valarray< T > &v)
 Set the values. More...
 
bool extrapolate () const
 Get extrapolate flag. More...
 
void extrapolate (bool flag)
 Set extrapolate flag. More...
 
bool haveData () const
 Get flag for having data.
 
T refValue () const
 Get reference value.
 
size_t size () const
 Get size of LUT. More...
 
T eval (double x) const
 Evaluate the LUT. More...
 

Detailed Description

template<class>
class isce3::core::LUT1d< class >

Data structure to hold a 1D Lookup table.

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

Constructor & Destructor Documentation

template<class >
isce3::core::LUT1d< class >::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
template<class >
isce3::core::LUT1d< class >::LUT1d ( const LUT1d< T > &  lut)
inline

Copy constructor.

Parameters
[in]lutLUT1d object to copy from
template<typename T >
isce3::core::LUT1d< T >::LUT1d ( const LUT2d< T > &  lut2d)
inline

Constructor from an LUT2d (values averaged in y-direction)

Parameters
[in]lut2dLUT2d to copy data from

Member Function Documentation

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

Get a reference to the coordinates.

Parameters
[out]coordsReference to valarray for coordinates
template<class >
const std::valarray<double>& isce3::core::LUT1d< class >::coords ( ) const
inline

Get a read-only reference to the coordinates.

Parameters
[out]coordsCopy of valarray for coordinates
template<class >
void isce3::core::LUT1d< class >::coords ( const std::valarray< double > &  c)
inline

Set the coordinates.

Parameters
[in]cInput valarray for coordinates
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
template<class >
bool isce3::core::LUT1d< class >::extrapolate ( ) const
inline

Get extrapolate flag.

Parameters
[out]flagExtrapolation flag
template<class >
void isce3::core::LUT1d< class >::extrapolate ( bool  flag)
inline

Set extrapolate flag.

Parameters
[in]flagExtrapolation flag
template<class >
LUT1d& isce3::core::LUT1d< class >::operator= ( const LUT1d< T > &  lut)
inline

Assignment operator.

Parameters
[in]lutLUT1d object to assign from
template<typename T >
isce3::core::LUT1d< T > & isce3::core::LUT1d< T >::operator= ( const LUT2d< T > &  lut2d)
inline

Assignment operator from an LUT2d (values averaged in y-direction)

Parameters
[in]lut2dLUT2d to copy data from
template<class >
size_t isce3::core::LUT1d< class >::size ( ) const
inline

Get size of LUT.

Parameters
[out]sizeSize (number of coordinates) of LUT
template<class >
std::valarray<T>& isce3::core::LUT1d< class >::values ( )
inline

Get a reference to the coordinates.

Parameters
[out]valuesReference to valarray for values
template<class >
const std::valarray<T>& isce3::core::LUT1d< class >::values ( ) const
inline

Get a read-only reference to the values.

Parameters
[out]valuesCopy of valarray for values
template<class >
void isce3::core::LUT1d< class >::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.8.5.