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
16namespace MEAL {
17
20
21 protected:
22
24 ParameterPolicy (Function* context);
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
FunctionPolicy(Function *context=0)
Default constructor.
Definition FunctionPolicy.C:5
static bool auto_install
Install policy upon construction.
Definition ParameterPolicy.h:29
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.
virtual double get_param(unsigned index) const =0
Return the value of the specified parameter.
virtual double get_variance(unsigned index) const =0
Return the variance of the specified parameter.
virtual std::string get_description(unsigned index) const =0
Return the name of the specified parameter.
virtual void set_param(unsigned index, double value)=0
Set the value of the specified parameter.
virtual ParameterPolicy * clone(Function *new_context) const =0
Clone constructor.
virtual void set_variance(unsigned index, double value)=0
Set the variance of the specified parameter.
virtual void set_infit(unsigned index, bool flag)=0
Set flag for parameter at index to be fitted.
virtual bool get_infit(unsigned index) const =0
Return true if parameter at index is to be fitted.
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