36#define G_ACCESS "GOptimizerPars::operator[](std::string&)"
37#define G_AT1 "GOptimizerPars::at(int&)"
38#define G_AT2 "GOptimizerPars::at(std::string&)"
39#define G_SET1 "GOptimizerPars::set(int&, GOptimizerPar&)"
40#define G_SET2 "GOptimizerPars::set(std::string&, GOptimizerPar&)"
41#define G_ATTACH1 "GOptimizerPars::attach(int&, GOptimizerPar*)"
42#define G_ATTACH2 "GOptimizerPars::attach(std::string&, GOptimizerPar*)"
43#define G_INSERT1 "GOptimizerPars::insert(int&, GOptimizerPar&)"
44#define G_INSERT2 "GOptimizerPars::insert(std::string&, GOptimizerPar&)"
45#define G_REMOVE1 "GOptimizerPars::remove(int&)"
46#define G_REMOVE2 "GOptimizerPars::remove(std::string&)"
88 for (
int i = 0; i < number; ++i) {
179 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
180 " container.\nPlease specify a valid parameter"
207 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
208 " container.\nPlease specify a valid parameter"
267 #if defined(G_RANGE_CHECK)
268 if (index < 0 || index >=
size()) {
292 #if defined(G_RANGE_CHECK)
293 if (index < 0 || index >=
size()) {
317 for (
int i = 0; i <
size(); ++i) {
318 if (
m_pars[i]->is_free()) {
343 #if defined(G_RANGE_CHECK)
344 if (index < 0 || index >=
size()) {
384 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
385 " container.\nPlease specify a valid parameter"
391 return set(index, par);
451 #if defined(G_RANGE_CHECK)
452 if (index < 0 || index >=
size()) {
489 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
490 " container.\nPlease specify a valid parameter"
518 #if defined(G_RANGE_CHECK)
519 if (index < 0 || index >=
size()) {
554 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
555 " container.\nPlease specify a valid parameter"
561 return insert(index, par);
578 #if defined(G_RANGE_CHECK)
579 if (index < 0 || index >=
size()) {
614 std::string msg =
"Parameter \""+name+
"\" not found in parameter"
615 " container.\nPlease specify a valid parameter"
645 int num = pars.
size();
651 for (
int i = 0; i < num; ++i) {
679 return (index != -1);
700 result.append(
"=== GOptimizerPars ===");
707 for (
int i = 0; i <
size(); ++i) {
751 for (
int i = 0; i < pars.
size(); ++i) {
768 for (
int i = 0; i <
size(); ++i) {
795 for (
int i = 0; i <
size(); ++i) {
796 if (
m_pars[i]->name() == name) {
Exception handler interface definition.
Optimizer parameters base class definition.
Optimizer parameter class.
GOptimizerPar * clone(void) const
Clone parameter.
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.
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.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.