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

Spectral table model parameter class. More...

#include <GModelSpectralTablePar.hpp>

Inheritance diagram for GModelSpectralTablePar:
GBase

Public Member Functions

 GModelSpectralTablePar (void)
 Void constructor. More...
 
 GModelSpectralTablePar (const GModelPar &par, const std::vector< double > &values)
 Model parameter constructor. More...
 
 GModelSpectralTablePar (const GModelSpectralTablePar &par)
 Copy constructor. More...
 
virtual ~GModelSpectralTablePar (void)
 Destructor. More...
 
GModelSpectralTableParoperator= (const GModelSpectralTablePar &par)
 Assignment operator. More...
 
void clear (void)
 Clear table model parameter. More...
 
GModelSpectralTableParclone (void) const
 Clone table model parameter. More...
 
std::string classname (void) const
 Return class name. More...
 
int size (void) const
 Return number of table model parameter values. More...
 
bool is_empty (void) const
 Signals if there are no table model parameter values. More...
 
GModelParpar (void)
 Return reference to table model parameter. More...
 
const GModelParpar (void) const
 Return reference to table model parameter (const version) More...
 
const GNodeArrayvalues (void) const
 Return reference to table model parameter values as node array. More...
 
const int & method (void) const
 Return reference to table model parameter interpolation method. More...
 
void method (const int &method)
 Set table model parameter interpolation method. More...
 
std::string print (const GChatter &chatter=NORMAL) const
 Print table model parameter. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModelSpectralTablePar &par)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GModelPar m_par
 Model parameter. More...
 
GNodeArray m_values
 Parameter values. More...
 
int m_method
 Interpolation method (0: linear, 1: logarithmic) More...
 

Detailed Description

Spectral table model parameter class.

Definition at line 44 of file GModelSpectralTablePar.hpp.

Constructor & Destructor Documentation

GModelSpectralTablePar::GModelSpectralTablePar ( void  )

Void constructor.

Definition at line 59 of file GModelSpectralTablePar.cpp.

References init_members().

Referenced by clone().

GModelSpectralTablePar::GModelSpectralTablePar ( const GModelPar par,
const std::vector< double > &  values 
)

Model parameter constructor.

Parameters
[in]parModel parameter.
[in]valuesParameter values.

Constructs a model table parameter combining a model parameter with a vector of parameter values. The values in the values vector may be unsorted, the constructor will put the values into an acsending order.

Definition at line 79 of file GModelSpectralTablePar.cpp.

References init_members(), m_par, m_values, par(), and values().

GModelSpectralTablePar::GModelSpectralTablePar ( const GModelSpectralTablePar par)

Copy constructor.

Parameters
[in]parTable model parameter.

Definition at line 103 of file GModelSpectralTablePar.cpp.

References copy_members(), and init_members().

GModelSpectralTablePar::~GModelSpectralTablePar ( void  )
virtual

Destructor.

Definition at line 119 of file GModelSpectralTablePar.cpp.

References free_members().

Member Function Documentation

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

Return class name.

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

Implements GBase.

Definition at line 89 of file GModelSpectralTablePar.hpp.

void GModelSpectralTablePar::clear ( void  )
virtual

Clear table model parameter.

Implements GBase.

Definition at line 171 of file GModelSpectralTablePar.cpp.

References free_members(), and init_members().

GModelSpectralTablePar * GModelSpectralTablePar::clone ( void  ) const
virtual

Clone table model parameter.

Implements GBase.

Definition at line 187 of file GModelSpectralTablePar.cpp.

References GModelSpectralTablePar().

Referenced by GModelSpectralTablePars::append(), GModelSpectralTablePars::insert(), and GModelSpectralTablePars::set().

void GModelSpectralTablePar::copy_members ( const GModelSpectralTablePar par)
protected

Copy class members.

Parameters
[in]parTable model parameter.

Definition at line 260 of file GModelSpectralTablePar.cpp.

References m_method, m_par, and m_values.

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

void GModelSpectralTablePar::free_members ( void  )
protected

Delete class members.

Definition at line 275 of file GModelSpectralTablePar.cpp.

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

void GModelSpectralTablePar::init_members ( void  )
protected

Initialise class members.

Definition at line 243 of file GModelSpectralTablePar.cpp.

References GNodeArray::clear(), GOptimizerPar::clear(), m_method, m_par, and m_values.

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

bool GModelSpectralTablePar::is_empty ( void  ) const
inline

Signals if there are no table model parameter values.

Returns
True if there are no table model parameter values, false otherwise.

Signals if there are no table model parameter values.

Definition at line 117 of file GModelSpectralTablePar.hpp.

References GNodeArray::is_empty(), and m_values.

const int & GModelSpectralTablePar::method ( void  ) const
inline

Return reference to table model parameter interpolation method.

Returns
Interpolation method (0: linear, 1: logarithmic).

Definition at line 165 of file GModelSpectralTablePar.hpp.

References m_method.

Referenced by GModelSpectralTable::load_par(), and method().

void GModelSpectralTablePar::method ( const int &  method)
inline

Set table model parameter interpolation method.

Parameters
[in]methodInterpolation method (0: linear, 1: logarithmic).

Definition at line 177 of file GModelSpectralTablePar.hpp.

References m_method, and method().

GModelSpectralTablePar & GModelSpectralTablePar::operator= ( const GModelSpectralTablePar par)

Assignment operator.

Parameters
[in]parTable model parameter.
Returns
Table model parameter.

Definition at line 141 of file GModelSpectralTablePar.cpp.

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

GModelPar & GModelSpectralTablePar::par ( void  )
inline

Return reference to table model parameter.

Returns
Reference to table model parameter.

Definition at line 129 of file GModelSpectralTablePar.hpp.

References m_par.

Referenced by GModelSpectralTablePars::append(), GModelSpectralTablePar(), GModelSpectralTablePars::insert(), and GModelSpectralTablePars::set().

const GModelPar & GModelSpectralTablePar::par ( void  ) const
inline

Return reference to table model parameter (const version)

Returns
Reference to table model parameter.

Definition at line 141 of file GModelSpectralTablePar.hpp.

References m_par.

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

Print table model parameter.

Parameters
[in]chatterChattiness.
Returns
String containing table model parameter information.

Implements GBase.

Definition at line 200 of file GModelSpectralTablePar.cpp.

References m_method, m_par, m_values, GOptimizerPar::name(), gammalib::parformat(), SILENT, GNodeArray::size(), and gammalib::str().

int GModelSpectralTablePar::size ( void  ) const
inline

Return number of table model parameter values.

Returns
Number of table model parameter values.

Returns the number of table model parameter values.

Definition at line 103 of file GModelSpectralTablePar.hpp.

References m_values, and GNodeArray::size().

const GNodeArray & GModelSpectralTablePar::values ( void  ) const
inline

Return reference to table model parameter values as node array.

Returns
Reference to table model parameter values as node array.

Definition at line 153 of file GModelSpectralTablePar.hpp.

References m_values.

Referenced by GModelSpectralTablePar(), and GModelSpectralTable::scale_energy().

Member Data Documentation

int GModelSpectralTablePar::m_method
protected

Interpolation method (0: linear, 1: logarithmic)

Definition at line 79 of file GModelSpectralTablePar.hpp.

Referenced by copy_members(), init_members(), method(), and print().

GModelPar GModelSpectralTablePar::m_par
protected

Model parameter.

Definition at line 77 of file GModelSpectralTablePar.hpp.

Referenced by copy_members(), GModelSpectralTablePar(), init_members(), par(), and print().

GNodeArray GModelSpectralTablePar::m_values
protected

Parameter values.

Definition at line 78 of file GModelSpectralTablePar.hpp.

Referenced by copy_members(), GModelSpectralTablePar(), init_members(), is_empty(), print(), size(), and values().


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