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

Abstract temporal model base class. More...

#include <GModelTemporal.hpp>

Inheritance diagram for GModelTemporal:
GBase GModelTemporalConst GModelTemporalLightCurve GModelTemporalPhaseCurve

Public Member Functions

 GModelTemporal (void)
 Void constructor. More...
 
 GModelTemporal (const GModelTemporal &model)
 Copy constructor. More...
 
virtual ~GModelTemporal (void)
 Destructor. More...
 
virtual GModelTemporaloperator= (const GModelTemporal &model)
 Assignment operator. More...
 
virtual GModelParoperator[] (const int &index)
 Returns model parameter. More...
 
virtual const GModelParoperator[] (const int &index) const
 Returns model parameter (const version) More...
 
virtual GModelParoperator[] (const std::string &name)
 Returns reference to model parameter. More...
 
virtual const GModelParoperator[] (const std::string &name) const
 Returns reference to model parameter (const version) More...
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GModelTemporalclone (void) const =0
 Clones object. More...
 
virtual std::string classname (void) const =0
 Return class name. More...
 
virtual std::string type (void) const =0
 
virtual double eval (const GTime &srcTime, const bool &gradients=false) const =0
 
virtual GTimes mc (const double &rate, const GTime &tmin, const GTime &tmax, GRan &ran) const =0
 
virtual void read (const GXmlElement &xml)=0
 
virtual void write (GXmlElement &xml) const =0
 
virtual std::string print (const GChatter &chatter=NORMAL) const =0
 Print content of object. More...
 
GModelParat (const int &index)
 Returns model parameter. More...
 
const GModelParat (const int &index) const
 Returns model parameter (const version) More...
 
bool has_par (const std::string &name) const
 Checks if parameter name exists. More...
 
int size (void) const
 Return number of parameters. More...
 
void autoscale (void)
 Autoscale parameters. 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 GModelTemporal &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

std::vector< GModelPar * > m_pars
 Parameter pointers. More...
 

Detailed Description

Abstract temporal model base class.

This class implements the temporal component of the factorised model. The temporal component of the factorised model is supposed to describe the relative variation of the source flux with respect to the mean value that is given by the spectral component. Normally, this model will have a mean value of 1.

Definition at line 51 of file GModelTemporal.hpp.

Constructor & Destructor Documentation

GModelTemporal::GModelTemporal ( void  )

Void constructor.

Definition at line 54 of file GModelTemporal.cpp.

References init_members().

GModelTemporal::GModelTemporal ( const GModelTemporal model)

Copy constructor.

Parameters
[in]modelTemporal model.

Definition at line 69 of file GModelTemporal.cpp.

References copy_members(), and init_members().

GModelTemporal::~GModelTemporal ( void  )
virtual

Destructor.

Definition at line 85 of file GModelTemporal.cpp.

References free_members().

Member Function Documentation

GModelPar & GModelTemporal::at ( const int &  index)

Returns model parameter.

Parameters
[in]indexParameter index [0,...,size()-1].
Returns
Model parameter.
Exceptions
GException::out_of_rangeParameter index is out of range.

Returns model parameter with index range checking.

Definition at line 197 of file GModelTemporal.cpp.

References G_AT, m_pars, and size().

const GModelPar & GModelTemporal::at ( const int &  index) const

Returns model parameter (const version)

Parameters
[in]indexParameter index [0,...,size()-1].
Returns
Model parameter.
Exceptions
GException::out_of_rangeParameter index is out of range.

Returns model parameter with index range checking.

Definition at line 220 of file GModelTemporal.cpp.

References G_AT, m_pars, and size().

void GModelTemporal::autoscale ( void  )

Autoscale parameters.

Sets the scale factors for all parameters so that the values are unity.

Definition at line 264 of file GModelTemporal.cpp.

References m_pars.

virtual std::string GModelTemporal::classname ( void  ) const
pure virtual

Return class name.

Returns
String containing the class name.

Returns the class name for non-abstract classes in a human readable way.

Implements GBase.

Implemented in GModelTemporalPhaseCurve, GModelTemporalLightCurve, and GModelTemporalConst.

virtual void GModelTemporal::clear ( void  )
pure virtual

Clear object.

Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.

Implements GBase.

Implemented in GModelTemporalPhaseCurve, GModelTemporalLightCurve, and GModelTemporalConst.

void GModelTemporal::copy_members ( const GModelTemporal model)
protected

Copy class members.

Parameters
[in]modelTemporal model.

Definition at line 302 of file GModelTemporal.cpp.

References m_pars.

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

void GModelTemporal::free_members ( void  )
protected
bool GModelTemporal::has_par ( const std::string &  name) const

Checks if parameter name exists.

Parameters
[in]nameParameter name.
Returns
True if parameter with specified name exists.

Searches all parameter names for a match with the specified name. If the specified name has been found, true is returned.

Definition at line 241 of file GModelTemporal.cpp.

References m_pars, and size().

void GModelTemporal::init_members ( void  )
protected
virtual GTimes GModelTemporal::mc ( const double &  rate,
const GTime tmin,
const GTime tmax,
GRan ran 
) const
pure virtual
GModelTemporal & GModelTemporal::operator= ( const GModelTemporal model)
virtual

Assignment operator.

Parameters
[in]modelTemporal model.
Returns
Temporal model.

Definition at line 107 of file GModelTemporal.cpp.

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

Referenced by GModelTemporalConst::operator=(), GModelTemporalLightCurve::operator=(), and GModelTemporalPhaseCurve::operator=().

GModelPar & GModelTemporal::operator[] ( const int &  index)
inlinevirtual

Returns model parameter.

Parameters
[in]indexParameter index [0,...,size()-1].
Returns
Model parameter.

Returns model parameter without index range checking.

Definition at line 106 of file GModelTemporal.hpp.

References m_pars.

const GModelPar & GModelTemporal::operator[] ( const int &  index) const
inlinevirtual

Returns model parameter (const version)

Parameters
[in]indexParameter index [0,...,size()-1].
Returns
Model parameter.

Returns model parameter without index range checking.

Definition at line 121 of file GModelTemporal.hpp.

References m_pars.

GModelPar & GModelTemporal::operator[] ( const std::string &  name)
virtual

Returns reference to model parameter.

Parameters
[in]nameParameter name.
Exceptions
GException::par_not_foundParameter with specified name not found in container.

Definition at line 136 of file GModelTemporal.cpp.

References G_ACCESS, m_pars, and size().

const GModelPar & GModelTemporal::operator[] ( const std::string &  name) const
virtual

Returns reference to model parameter (const version)

Parameters
[in]nameParameter name.
Exceptions
GException::par_not_foundParameter with specified name not found in container.

Definition at line 162 of file GModelTemporal.cpp.

References G_ACCESS, m_pars, and size().

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

Print content of object.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing the content of the object.

Formats the content in a standard way and puts this content in a C++ string that is returned.

Implements GBase.

Implemented in GModelTemporalPhaseCurve, GModelTemporalLightCurve, and GModelTemporalConst.

virtual void GModelTemporal::read ( const GXmlElement xml)
pure virtual

Member Data Documentation


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