GammaLib
2.1.0.dev
|
Spectral table model parameter class. More...
#include <GModelSpectralTablePar.hpp>
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... | |
GModelSpectralTablePar & | operator= (const GModelSpectralTablePar &par) |
Assignment operator. More... | |
void | clear (void) |
Clear table model parameter. More... | |
GModelSpectralTablePar * | clone (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... | |
GModelPar & | par (void) |
Return reference to table model parameter. More... | |
const GModelPar & | par (void) const |
Return reference to table model parameter (const version) More... | |
const GNodeArray & | values (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... | |
Spectral table model parameter class.
Definition at line 44 of file GModelSpectralTablePar.hpp.
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.
[in] | par | Model parameter. |
[in] | values | Parameter 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.
[in] | par | Table model parameter. |
Definition at line 103 of file GModelSpectralTablePar.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 89 of file GModelSpectralTablePar.hpp.
|
virtual |
Clear table model parameter.
Implements GBase.
Definition at line 171 of file GModelSpectralTablePar.cpp.
References free_members(), and init_members().
|
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().
|
protected |
Copy class members.
[in] | par | Table model parameter. |
Definition at line 260 of file GModelSpectralTablePar.cpp.
References m_method, m_par, and m_values.
Referenced by GModelSpectralTablePar(), and operator=().
|
protected |
Delete class members.
Definition at line 275 of file GModelSpectralTablePar.cpp.
Referenced by clear(), operator=(), and ~GModelSpectralTablePar().
|
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=().
|
inline |
Signals if there are no table model parameter values.
Signals if there are no table model parameter values.
Definition at line 117 of file GModelSpectralTablePar.hpp.
References GNodeArray::is_empty(), and m_values.
|
inline |
Return reference to table model parameter interpolation method.
Definition at line 165 of file GModelSpectralTablePar.hpp.
References m_method.
Referenced by GModelSpectralTable::load_par(), and method().
|
inline |
Set table model parameter interpolation method.
[in] | method | Interpolation method (0: linear, 1: logarithmic). |
Definition at line 177 of file GModelSpectralTablePar.hpp.
GModelSpectralTablePar & GModelSpectralTablePar::operator= | ( | const GModelSpectralTablePar & | par | ) |
Assignment operator.
[in] | par | Table model parameter. |
Definition at line 141 of file GModelSpectralTablePar.cpp.
References copy_members(), free_members(), and init_members().
|
inline |
Return 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().
|
inline |
Return reference to table model parameter (const version)
Definition at line 141 of file GModelSpectralTablePar.hpp.
References m_par.
Print table model parameter.
[in] | chatter | Chattiness. |
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().
|
inline |
Return 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().
|
inline |
Return 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().
|
protected |
Interpolation method (0: linear, 1: logarithmic)
Definition at line 79 of file GModelSpectralTablePar.hpp.
Referenced by copy_members(), init_members(), method(), and print().
|
protected |
Model parameter.
Definition at line 77 of file GModelSpectralTablePar.hpp.
Referenced by copy_members(), GModelSpectralTablePar(), init_members(), par(), and print().
|
protected |
Parameter values.
Definition at line 78 of file GModelSpectralTablePar.hpp.
Referenced by copy_members(), GModelSpectralTablePar(), init_members(), is_empty(), print(), size(), and values().