ScalarParameter.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/ScalarParameter.h
10
11#ifndef __ScalarParameter_H
12#define __ScalarParameter_H
13
14#include "MEAL/Scalar.h"
15
16namespace MEAL {
17
19 class ScalarParameter : public Scalar {
20
21 public:
22
24 ScalarParameter (const Estimate<double>& value = 0.0);
25
26 void set_value (const Estimate<double>& value);
27 Estimate<double> get_value () const;
28
29 void set_fit (bool flag);
30 bool get_fit () const;
31
33 std::string get_value_name () const;
34
36 void set_value_name (const std::string& name);
37
38 // ///////////////////////////////////////////////////////////////////
39 //
40 // Function implementation
41 //
42 // ///////////////////////////////////////////////////////////////////
43
45 std::string get_name () const;
46
47 protected:
48
49 // ///////////////////////////////////////////////////////////////////
50 //
51 // Optimized implementation
52 //
53 // ///////////////////////////////////////////////////////////////////
54
56 void calculate (double& x, std::vector<double>* grad=0);
57
58 };
59
60}
61
62#endif
63
std::string get_value_name() const
Get the name of the parameter.
Definition ScalarParameter.C:48
std::string get_name() const
Return the name of the class.
Definition ScalarParameter.C:23
void calculate(double &x, std::vector< double > *grad=0)
Return the value (and gradient, if requested) of the function.
Definition ScalarParameter.C:61
void set_value_name(const std::string &name)
Set the name of the parameter.
Definition ScalarParameter.C:53
ScalarParameter(const Estimate< double > &value=0.0)
Default constructor.
Definition ScalarParameter.C:15
Pure virtual base class of scalar functions.
Definition Scalar.h:20
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0