ParameterPolicy.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/ParameterPolicy.h
10 
11 #ifndef __MEAL_ParameterPolicy_H
12 #define __MEAL_ParameterPolicy_H
13 
14 #include "MEAL/FunctionPolicy.h"
15 
16 namespace MEAL {
17 
19  class ParameterPolicy : public FunctionPolicy {
20 
21  protected:
22 
25 
26  public:
27 
29  static bool auto_install;
30 
32  virtual ParameterPolicy* clone (Function* new_context) const = 0;
33 
35  virtual unsigned get_nparam () const = 0;
36 
38  virtual std::string get_name (unsigned index) const = 0;
39 
41  virtual std::string get_description (unsigned index) const = 0;
42 
44  virtual double get_param (unsigned index) const = 0;
45 
47  virtual void set_param (unsigned index, double value) = 0;
48 
50  virtual double get_variance (unsigned index) const = 0;
51 
53  virtual void set_variance (unsigned index, double value) = 0;
54 
56  virtual bool get_infit (unsigned index) const = 0;
57 
59  virtual void set_infit (unsigned index, bool flag) = 0;
60 
61  };
62 
63 }
64 
65 #endif
virtual void set_variance(unsigned index, double value)=0
Set the variance of the specified parameter.
virtual double get_variance(unsigned index) const =0
Return the variance of the specified parameter.
Reference::To< ParameterPolicy > parameter_policy
The policy for managing function parameters.
Definition: Function.h:199
static bool auto_install
Install policy upon construction.
Definition: ParameterPolicy.h:39
ParameterPolicy(Function *context)
Default destructor.
Definition: ParameterPolicy.C:14
virtual ParameterPolicy * clone(Function *new_context) const =0
Clone constructor.
virtual std::string get_description(unsigned index) const =0
Return the name of the specified parameter.
virtual double get_param(unsigned index) const =0
Return the value of the specified parameter.
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
virtual bool get_infit(unsigned index) const =0
Return true if parameter at index is to be fitted.
virtual void set_infit(unsigned index, bool flag)=0
Set flag for parameter at index to be fitted.
Managers of Function parameters.
Definition: ParameterPolicy.h:24
Pure virtual base class of all functions.
Definition: Function.h:49
virtual void set_param(unsigned index, double value)=0
Set the value of the specified parameter.
virtual std::string get_name(unsigned index) const =0
Return the name of the specified parameter.
virtual unsigned get_nparam() const =0
Return the number of parameters.
Policies that customize Function behaviours.
Definition: FunctionPolicy.h:26

Generated using doxygen 1.8.17