NoParameters.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2004 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/NoParameters.h
10
11#ifndef __MEAL_NoParameters_H
12#define __MEAL_NoParameters_H
13
14#include "MEAL/ParameterPolicy.h"
15
16namespace MEAL {
17
20
21 public:
22
25
27 NoParameters* clone (Function*) const { return new NoParameters; }
28
29 // ///////////////////////////////////////////////////////////////////
30 //
31 // ParameterPolicy implementation
32 //
33 // ///////////////////////////////////////////////////////////////////
34
36 unsigned get_nparam () const { return 0; }
37
39 std::string get_name (unsigned index) const { return ""; }
40
42 std::string get_description (unsigned index) const { return ""; }
43
45 double get_param (unsigned index) const { return 0.0; }
46
48 void set_param (unsigned index, double value) { }
49
51 double get_variance (unsigned index) const { return 0; }
52
54 void set_variance (unsigned index, double value) { }
55
57 bool get_infit (unsigned index) const { return false; }
58
60 void set_infit (unsigned index, bool flag) { }
61
62 };
63
64}
65
66#endif
Pure virtual base class of all functions.
Definition Function.h:49
void set_param(unsigned index, double value)
Set the value of the specified parameter.
Definition NoParameters.h:48
NoParameters * clone(Function *) const
Clone construtor.
Definition NoParameters.h:27
NoParameters()
Default constructor.
Definition NoParameters.h:24
std::string get_description(unsigned index) const
Return the name of the specified parameter.
Definition NoParameters.h:42
unsigned get_nparam() const
Return the number of parameters.
Definition NoParameters.h:36
std::string get_name(unsigned index) const
Return the name of the specified parameter.
Definition NoParameters.h:39
double get_variance(unsigned index) const
Return the variance of the specified parameter.
Definition NoParameters.h:51
void set_infit(unsigned index, bool flag)
Set flag for parameter at index to be fitted.
Definition NoParameters.h:60
bool get_infit(unsigned index) const
Return true if parameter at index is to be fitted.
Definition NoParameters.h:57
double get_param(unsigned index) const
Return the value of the specified parameter.
Definition NoParameters.h:45
void set_variance(unsigned index, double value)
Set the variance of the specified parameter.
Definition NoParameters.h:54
ParameterPolicy(Function *context)
Default destructor.
Definition ParameterPolicy.C:14
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0