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 
16 namespace MEAL {
17 
19  class NoParameters : public ParameterPolicy {
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
void set_variance(unsigned index, double value)
Set the variance of the specified parameter.
Definition: NoParameters.h:64
NoParameters()
Default constructor.
Definition: NoParameters.h:34
NoParameters * clone(Function *) const
Clone construtor.
Definition: NoParameters.h:37
double get_variance(unsigned index) const
Return the variance of the specified parameter.
Definition: NoParameters.h:61
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
double get_param(unsigned index) const
Return the value of the specified parameter.
Definition: NoParameters.h:55
Represents a model with no parameters.
Definition: NoParameters.h:24
Managers of Function parameters.
Definition: ParameterPolicy.h:24
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:58
void set_infit(unsigned index, bool flag)
Set flag for parameter at index to be fitted.
Definition: NoParameters.h:70
std::string get_description(unsigned index) const
Return the name of the specified parameter.
Definition: NoParameters.h:52
bool get_infit(unsigned index) const
Return true if parameter at index is to be fitted.
Definition: NoParameters.h:67
unsigned get_nparam() const
Return the number of parameters.
Definition: NoParameters.h:46
std::string get_name(unsigned index) const
Return the name of the specified parameter.
Definition: NoParameters.h:49

Generated using doxygen 1.8.17