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 
16 namespace 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 
ScalarParameter(const Estimate< double > &value=0.0)
Default constructor.
Definition: ScalarParameter.C:15
Abstract base class implements parameter storage and access.
Definition: OneParameter.h:26
std::string get_value_name() const
Get the name of the parameter.
Definition: ScalarParameter.C:48
void set_name(const std::string &_name)
Set the name of the parameter.
Definition: OneParameter.h:54
void set_value_name(const std::string &name)
Set the name of the parameter.
Definition: ScalarParameter.C:53
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void calculate(double &x, std::vector< double > *grad=0)
Return the value (and gradient, if requested) of the function.
Definition: ScalarParameter.C:61
std::string get_name() const
Return the name of the class.
Definition: ScalarParameter.C:23

Generated using doxygen 1.8.17