27 #ifndef GMODELSPECTRAL_HPP
28 #define GMODELSPECTRAL_HPP
84 virtual void clear(
void) = 0;
86 virtual std::string
classname(
void)
const = 0;
87 virtual std::string
type(
void)
const = 0;
90 const bool& gradients =
false)
const = 0;
104 bool has_par(
const std::string& name)
const;
105 int size(
void)
const;
159 return (
int)
m_pars.size();
virtual void write(GXmlElement &xml) const =0
virtual GEnergy mc(const GEnergy &emin, const GEnergy &emax, const GTime &time, GRan &ran) const =0
Abstract spectral model base class.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
int size(void) const
Return number of parameters.
virtual GModelSpectral & operator=(const GModelSpectral &model)
Assignment operator.
virtual double eval(const GEnergy &srcEng, const GTime &srcTime=GTime(), const bool &gradients=false) const =0
std::vector< GModelPar * > m_pars
Parameter pointers.
Definition of interface for all GammaLib classes.
GModelSpectral(void)
Void constructor.
Random number generator class.
virtual std::string type(void) const =0
virtual ~GModelSpectral(void)
Destructor.
virtual std::string classname(void) const =0
Return class name.
virtual void read(const GXmlElement &xml)=0
GModelPar & at(const int &index)
Returns model parameter.
bool has_par(const std::string &name) const
Checks if parameter name exists.
Interface class for all GammaLib classes.
void copy_members(const GModelSpectral &model)
Copy class members.
void autoscale(void)
Autoscale parameters.
virtual GModelPar & operator[](const int &index)
Returns model parameter.
virtual GModelSpectral * clone(void) const =0
Clones object.
void init_members(void)
Initialise class members.
virtual void clear(void)=0
Clear object.
virtual double flux(const GEnergy &emin, const GEnergy &emax) const =0
virtual double eflux(const GEnergy &emin, const GEnergy &emax) const =0
Time class interface definition.
void free_members(void)
Delete class members.
Class that handles energies in a unit independent way.