120 virtual std::string
type(
void)
const = 0;
124 const bool& gradients =
false)
const = 0;
134 int size(
void)
const;
140 const std::string&
name(
void)
const;
142 const double&
ts(
void)
const;
143 void ts(
const double&
ts);
144 const bool&
tscalc(
void)
const;
146 const bool&
has_ts(
void)
const;
153 std::string
ids(
void)
const;
154 void ids(
const std::string&
ids);
156 const std::string&
ids)
const;
235 return (
int)
m_pars.size();
Definition of interface for all GammaLib classes.
Energy value class definition.
Model associations container class definition.
Model parameter class interface definition.
Time class interface definition.
XML element node class interface definition.
Interface class for all GammaLib classes.
Class that handles energies in a unit independent way.
Abstract interface for the event classes.
Sparse matrix class interface definition.
Model associations container class.
const GModelAssociations & associations(void) const
Return model associations.
const bool & has_ts(void) const
Signals that model has Test Statistics value.
void read_scales(const GXmlElement &xml)
Read instrument scales from XML element.
virtual ~GModel(void)
Destructor.
virtual std::string classname(void) const =0
Return class name.
const bool & tscalc(void) const
Return Test Statistic computation flag.
GModelPar & scale(const int &index)
Returns reference to scale parameter by index.
virtual void read(const GXmlElement &xml)=0
std::vector< std::string > m_instruments
Instruments to which model applies.
std::vector< GModelPar * > m_pars
Pointers to all model parameters.
void write_scales(GXmlElement &xml) const
Write instrument scales into XML element.
virtual std::string type(void) const =0
virtual bool is_constant(void) const =0
const double & ts(void) const
Return Test Statistic value.
bool has_scales(void) const
Signals that model has scales.
const bool & has_eval_indices(void) const
Signals that parameter indices updated by eval() method were set.
void write_attributes(GXmlElement &xml) const
Write model attributes.
virtual GVector eval(const GObservation &obs, GMatrixSparse *gradients=NULL) const =0
std::string m_name
Model name.
bool is_valid(const std::string &instruments, const std::string &ids) const
Verifies if model is valid for a given instrument and identifier.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
void copy_members(const GModel &model)
Copy class members.
std::string print_attributes(void) const
Print model attributes.
std::vector< int > m_eval_inx
int size(void) const
Return number of parameters in model.
bool m_tscalc
Signals if TS should be computed.
bool m_has_tscalc
Signals if tscalc attribute is available.
bool has_par(const std::string &name) const
Checks if parameter name exists.
GModel(void)
Void constructor.
virtual GModelPar & operator[](const int &index)
Returns reference to model parameter by index.
std::string instruments(void) const
Returns instruments to which model applies.
std::string ids(void) const
Returns observation identifiers to which model applies.
virtual double npred(const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const =0
GModelPar & at(const int &index)
Returns reference to model parameter by index.
virtual GModel & operator=(const GModel &model)
Assignment operator.
bool m_has_ts
Signals if TS is available.
std::vector< std::string > m_ids
Identifiers to which model applies.
void read_attributes(const GXmlElement &xml)
Read model attributes.
virtual double eval(const GEvent &event, const GObservation &obs, const bool &gradients=false) const =0
virtual void write(GXmlElement &xml) const =0
virtual void clear(void)=0
Clear object.
double m_ts
Test Statistic of the model.
virtual GModel * clone(void) const =0
Clones object.
GModelAssociations m_associations
Model associations.
const std::string & name(void) const
Return parameter name.
int scales(void) const
Return number of scale parameters in model.
std::vector< GModelPar > m_scales
Model instrument scale factors.
const std::vector< int > & eval_indices(void) const
Return vector of parameter indices updated by eval() method.
Abstract observation base class.