GOptimizerPar.i
4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/***************************************************************************
* GOptimizerPar.i - Optimizer parameter class *
* ----------------------------------------------------------------------- *
* copyright (C) 2013 by Juergen Knoedlseder *
* ----------------------------------------------------------------------- *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
***************************************************************************/
/**
* @file GOptimizerPar.i
* @brief Optimizer parameter class interface definition
* @author Juergen Knoedlseder
*/
%{
/* Put headers and other declarations here that are needed for compilation */
#include "GOptimizerPar.hpp"
%}
/***********************************************************************//**
* @class GOptimizerPar
*
* @brief Model parameter class
***************************************************************************/
class GOptimizerPar : public GBase {
public:
// Constructors and destructors
GOptimizerPar(void);
GOptimizerPar(const std::string& name, const double& value);
GOptimizerPar(const std::string& name, const double& factor,
const double& scale);
virtual ~GOptimizerPar(void);
// Attribute methods
double value(void) const;
double error(void) const;
double gradient(void) const;
double min(void) const;
double max(void) const;
void value(const double& value);
void error(const double& error);
void gradient(const double& gradient);
void min(const double& min);
void max(const double& max);
void range(const double& min, const double& max);
// Factorization methods
const double& factor_value(void) const;
const double& factor_error(void) const;
const double& factor_gradient(void) const;
const double& factor_min(void) const;
const double& factor_max(void) const;
const double& scale(void) const;
void factor_value(const double& value);
void factor_error(const double& error);
void factor_gradient(const double& gradient);
void factor_min(const double& min);
void factor_max(const double& max);
void factor_range(const double& min, const double& max);
void scale(const double& scale);
// Boundary methods
bool has_min(void) const;
bool has_max(void) const;
bool has_range(void) const;
void remove_min(void);
void remove_max(void);
void remove_range(void);
// Property methods
bool is_free(void) const;
bool is_fixed(void) const;
bool has_grad(void) const;
void free(void);
void fix(void);
void has_grad(const bool& grad);
// Other methods
void clear(void);
GOptimizerPar* clone(void) const;
const std::string& name(void) const;
const std::string& unit(void) const;
void name(const std::string& name);
void unit(const std::string& unit);
void autoscale(void);
};
/***********************************************************************//**
* @brief GOptimizerPar class extension
***************************************************************************/
%extend GOptimizerPar {
GOptimizerPar copy() {
return (*self);
}
};