27#ifndef GOPTIMIZERPARS_HPP
28#define GOPTIMIZERPARS_HPP
75 int nfree(
void)
const;
84 void remove(
const int& index);
85 void remove(
const std::string& name);
88 bool contains(
const std::string& name)
const;
96 int get_index(
const std::string& name)
const;
112 return (
"GOptimizerPars");
156 return (
int)
m_pars.size();
Definition of interface for container classes.
Optimizer parameter class interface definition.
Interface class for container classes.
Optimizer parameter class.
Optimizer parameter container class.
GOptimizerPar * at(const int &index)
Return pointer to parameter.
std::vector< GOptimizerPar * > m_pars
List of parameters.
void init_members(void)
Initialise class members.
GOptimizerPars & operator=(const GOptimizerPars &pars)
Assignment operator.
virtual ~GOptimizerPars(void)
Destructor.
std::vector< bool > m_alloc
Flags allocation.
void reserve(const int &num)
Reserves space for parameters in container.
GOptimizerPars(void)
Void constructor.
GOptimizerPar * set(const int &index, const GOptimizerPar &par)
Set parameter in container.
GOptimizerPar * append(const GOptimizerPar &par)
Append parameter to container.
void clear(void)
Clear parameter container.
GOptimizerPar * operator[](const int &index)
Return pointer to parameter.
std::string print(const GChatter &chatter=NORMAL) const
Print parameters.
bool contains(const std::string &name) const
Signals if parameter name exists.
int size(void) const
Return number of parameters in container.
int get_index(const std::string &name) const
Return parameter index by name.
GOptimizerPars * clone(void) const
Clone parameter container.
GOptimizerPar * insert(const int &index, const GOptimizerPar &par)
Insert parameter into container.
std::string classname(void) const
Return class name.
void copy_members(const GOptimizerPars &pars)
Copy class members.
int nfree(void) const
Return number of free parameters.
void free_members(void)
Delete class members.
void attach(GOptimizerPar *par)
Attach parameter to container.
bool is_empty(void) const
Signals if there are no parameters in container.
void remove(const int &index)
Remove parameter from container.
void extend(const GOptimizerPars &pars)
Append parameter container.