GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GBilinear Class Reference

Bilinear interpolator class. More...

#include <GBilinear.hpp>

Inheritance diagram for GBilinear:
GBase

Public Member Functions

 GBilinear (void)
 Void constructor. More...
 
 GBilinear (const GBilinear &interpolator)
 Copy constructor. More...
 
virtual ~GBilinear (void)
 Destructor. More...
 
GBilinearoperator= (const GBilinear &interpolator)
 Assignment operator. More...
 
double operator() (const double *array)
 Interpolator. More...
 
void clear (void)
 Clear node array. More...
 
GBilinearclone (void) const
 Clone bilinear interolator. More...
 
std::string classname (void) const
 Return class name. More...
 
int & index1 (void)
 Access index 1. More...
 
int & index2 (void)
 Access index 2. More...
 
int & index3 (void)
 Access index 3. More...
 
int & index4 (void)
 Access index 4. More...
 
double & weight1 (void)
 Access weight 1. More...
 
double & weight2 (void)
 Access weight 2. More...
 
double & weight3 (void)
 Access weight 3. More...
 
double & weight4 (void)
 Access weight 4. More...
 
std::string print (const GChatter &chatter=NORMAL) const
 Print nodes. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Private Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GBilinear &interpolator)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Private Attributes

int m_inx1
 
int m_inx2
 
int m_inx3
 
int m_inx4
 
double m_wgt1
 
double m_wgt2
 
double m_wgt3
 
double m_wgt4
 

Detailed Description

Bilinear interpolator class.

Definition at line 40 of file GBilinear.hpp.

Constructor & Destructor Documentation

GBilinear::GBilinear ( void  )

Void constructor.

Definition at line 54 of file GBilinear.cpp.

References init_members().

Referenced by clone().

GBilinear::GBilinear ( const GBilinear interpolator)

Copy constructor.

Parameters
[in]interpolatorBilinear interpolator.

Definition at line 69 of file GBilinear.cpp.

References copy_members(), and init_members().

GBilinear::~GBilinear ( void  )
virtual

Destructor.

Definition at line 85 of file GBilinear.cpp.

References free_members().

Member Function Documentation

std::string GBilinear::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GBilinear").

Implements GBase.

Definition at line 90 of file GBilinear.hpp.

void GBilinear::clear ( void  )
virtual

Clear node array.

Implements GBase.

Definition at line 156 of file GBilinear.cpp.

References free_members(), and init_members().

Referenced by GSkyMap::extract(), and GSkyMap::init_members().

GBilinear * GBilinear::clone ( void  ) const
virtual

Clone bilinear interolator.

Returns
Pointer to deep copy of bilinear interolator.

Implements GBase.

Definition at line 174 of file GBilinear.cpp.

References GBilinear().

void GBilinear::copy_members ( const GBilinear interpolator)
private

Copy class members.

Parameters
[in]interpolatorBilinear interpolator.

Definition at line 249 of file GBilinear.cpp.

References m_inx1, m_inx2, m_inx3, m_inx4, m_wgt1, m_wgt2, m_wgt3, and m_wgt4.

Referenced by GBilinear(), and operator=().

void GBilinear::free_members ( void  )
private

Delete class members.

Definition at line 269 of file GBilinear.cpp.

Referenced by clear(), operator=(), and ~GBilinear().

int & GBilinear::index1 ( void  )
inline

Access index 1.

Returns
Reference to index 1.

Definition at line 102 of file GBilinear.hpp.

References m_inx1.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

int & GBilinear::index2 ( void  )
inline

Access index 2.

Returns
Reference to index 2.

Definition at line 114 of file GBilinear.hpp.

References m_inx2.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

int & GBilinear::index3 ( void  )
inline

Access index 3.

Returns
Reference to index 3.

Definition at line 126 of file GBilinear.hpp.

References m_inx3.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

int & GBilinear::index4 ( void  )
inline

Access index 4.

Returns
Reference to index 4.

Definition at line 138 of file GBilinear.hpp.

References m_inx4.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

void GBilinear::init_members ( void  )
private

Initialise class members.

Definition at line 227 of file GBilinear.cpp.

References m_inx1, m_inx2, m_inx3, m_inx4, m_wgt1, m_wgt2, m_wgt3, and m_wgt4.

Referenced by clear(), GBilinear(), and operator=().

double GBilinear::operator() ( const double *  array)

Interpolator.

Parameters
[in]arrayBilinear interpolator.
Returns
Interpolated value.

Definition at line 134 of file GBilinear.cpp.

References m_inx1, m_inx2, m_inx3, m_inx4, m_wgt1, m_wgt2, m_wgt3, and m_wgt4.

GBilinear & GBilinear::operator= ( const GBilinear interpolator)

Assignment operator.

Parameters
[in]interpolatorBilinear interpolator.
Returns
Bilinear interpolator.

Definition at line 107 of file GBilinear.cpp.

References copy_members(), free_members(), and init_members().

std::string GBilinear::print ( const GChatter chatter = NORMAL) const
virtual

Print nodes.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing nodes information.

Implements GBase.

Definition at line 186 of file GBilinear.cpp.

References m_inx1, m_inx2, m_inx3, m_inx4, m_wgt1, m_wgt2, m_wgt3, m_wgt4, gammalib::parformat(), SILENT, and gammalib::str().

double & GBilinear::weight1 ( void  )
inline

Access weight 1.

Returns
Reference to weight 1.

Definition at line 150 of file GBilinear.hpp.

References m_wgt1.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

double & GBilinear::weight2 ( void  )
inline

Access weight 2.

Returns
Reference to weight 2.

Definition at line 162 of file GBilinear.hpp.

References m_wgt2.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

double & GBilinear::weight3 ( void  )
inline

Access weight 3.

Returns
Reference to weight 3.

Definition at line 174 of file GBilinear.hpp.

References m_wgt3.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

double & GBilinear::weight4 ( void  )
inline

Access weight 4.

Returns
Reference to weight 4.

Definition at line 186 of file GBilinear.hpp.

References m_wgt4.

Referenced by GHealpix::interpolator(), and GSkyMap::operator()().

Member Data Documentation

int GBilinear::m_inx1
private

Definition at line 73 of file GBilinear.hpp.

Referenced by copy_members(), index1(), init_members(), operator()(), and print().

int GBilinear::m_inx2
private

Definition at line 74 of file GBilinear.hpp.

Referenced by copy_members(), index2(), init_members(), operator()(), and print().

int GBilinear::m_inx3
private

Definition at line 75 of file GBilinear.hpp.

Referenced by copy_members(), index3(), init_members(), operator()(), and print().

int GBilinear::m_inx4
private

Definition at line 76 of file GBilinear.hpp.

Referenced by copy_members(), index4(), init_members(), operator()(), and print().

double GBilinear::m_wgt1
private

Definition at line 77 of file GBilinear.hpp.

Referenced by copy_members(), init_members(), operator()(), print(), and weight1().

double GBilinear::m_wgt2
private

Definition at line 78 of file GBilinear.hpp.

Referenced by copy_members(), init_members(), operator()(), print(), and weight2().

double GBilinear::m_wgt3
private

Definition at line 79 of file GBilinear.hpp.

Referenced by copy_members(), init_members(), operator()(), print(), and weight3().

double GBilinear::m_wgt4
private

Definition at line 80 of file GBilinear.hpp.

Referenced by copy_members(), init_members(), operator()(), print(), and weight4().


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