ScalarConstant.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/ScalarConstant.h
10
11#ifndef __ScalarConstant_H
12#define __ScalarConstant_H
13
14#include "MEAL/Scalar.h"
15
16namespace MEAL {
17
19 class ScalarConstant : public Scalar {
20
21 public:
22
24 ScalarConstant (double value = 0);
25
27 const ScalarConstant& operator = (const ScalarConstant& scalar);
28
30 void set_value (double val) { value = val; }
31
32 // ///////////////////////////////////////////////////////////////////
33 //
34 // Function implementation
35 //
36 // ///////////////////////////////////////////////////////////////////
37
39 std::string get_name () const;
40
41 // ///////////////////////////////////////////////////////////////////
42 //
43 // Scalar implementation
44 //
45 // ///////////////////////////////////////////////////////////////////
46
48 void calculate (double& result, std::vector<double>* gradient);
49
50 protected:
51
53 double value;
54
55 };
56
57}
58
59#endif
ScalarConstant(double value=0)
Default constructor.
Definition ScalarConstant.C:14
void calculate(double &result, std::vector< double > *gradient)
Return the value.
Definition ScalarConstant.C:36
void set_value(double val)
Set the value.
Definition ScalarConstant.h:30
const ScalarConstant & operator=(const ScalarConstant &scalar)
Assignment operator.
Definition ScalarConstant.C:24
double value
The value returned by evaluate.
Definition ScalarConstant.h:53
std::string get_name() const
Return the name of the class.
Definition ScalarConstant.C:31
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