36 #define G_ACCESS "GModelSpectral::operator[](std::string&)"
37 #define G_AT "GModelPar& GModelSpectral::at(int&)"
111 if (
this != &model) {
141 for (; index <
size(); ++index) {
142 if (
m_pars[index]->name() == name) {
148 if (index >=
size()) {
149 std::string msg =
"Model parameter \""+name+
"\" not found in model. "
150 "Please specify a valid model parameter name.";
171 for (; index <
size(); ++index) {
172 if (
m_pars[index]->name() == name) {
178 if (index >=
size()) {
179 std::string msg =
"Model parameter \""+name+
"\" not found in model. "
180 "Please specify a valid model parameter name.";
209 if (index < 0 || index >=
size()) {
232 if (index < 0 || index >=
size()) {
256 for (
int i = 0; i <
size(); ++i) {
257 if (
m_pars[i]->name() == name) {
276 for (
int i = 0; i <
m_pars.size(); ++i) {
Abstract spectral model base class.
int size(void) const
Return number of parameters.
virtual GModelSpectral & operator=(const GModelSpectral &model)
Assignment operator.
std::vector< GModelPar * > m_pars
Parameter pointers.
GModelSpectral(void)
Void constructor.
virtual ~GModelSpectral(void)
Destructor.
Model parameter class interface definition.
GModelPar & at(const int &index)
Returns model parameter.
bool has_par(const std::string &name) const
Checks if parameter name exists.
void copy_members(const GModelSpectral &model)
Copy class members.
void autoscale(void)
Autoscale parameters.
virtual GModelPar & operator[](const int &index)
Returns model parameter.
Abstract spectral model base class interface definition.
void init_members(void)
Initialise class members.
Exception handler interface definition.
void free_members(void)
Delete class members.