173 const GModel*
at(
const int& index)
const;
174 int size(
void)
const;
181 void remove(
const int& index);
182 void remove(
const std::string& name);
185 bool contains(
const std::string& name)
const;
190 int npars(
void)
const;
194 const bool& gradients =
false)
const;
204 int get_index(
const std::string& name)
const;
double eval(const GEvent &event, const GObservation &obs, const bool &gradients=false) const
Evaluate sum of all models.
void copy_members(const GModels &models)
Copy class members.
Sparse matrix class interface definition.
void read(const GXml &xml)
Read models from XML document.
GModels * clone(void) const
Clone instance.
GModels(void)
Void constructor.
GModel * operator[](const int &index)
Return pointer to model.
Optimizer parameter container class.
Abstract interface for the event classes.
void extend(const GModels &models)
Append model container.
GOptimizerPars pars(void) const
Return optimizer parameter container.
void save(const GFilename &filename) const
Save models into XML file.
void reserve(const int &num)
Reserves space for models in container.
GModel * insert(const int &index, const GModel &model)
Insert model into container.
void clear(void)
Clear object.
std::vector< GModel * > m_models
List of models.
int get_index(const std::string &name) const
Return model index by name.
void free_members(void)
Delete class members.
std::string classname(void) const
Return class name.
GModel * set(const int &index, const GModel &model)
Set model in container.
Abstract observation base class.
void write(GXml &xml) const
Write models into XML document.
GModel * at(const int &index)
Return pointer to model.
void load(const GFilename &filename)
Load models from XML file.
bool contains(const std::string &name) const
Signals if model name exists.
std::string print(const GChatter &chatter=NORMAL) const
Print models.
void init_members(void)
Initialise class members.
int npars(void) const
Return number of model parameters in container.
virtual ~GModels(void)
Destructor.
Definition of interface for container classes.
GModels & operator=(const GModels &models)
Assignment operator.
int size(void) const
Return number of models in container.
GModel * append(const GModel &model)
Append model to container.
Interface class for container classes.
bool is_empty(void) const
Signals if there are no models in container.