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