14#include "MEAL/OneParameter.h"
15#include "MEAL/Function.h"
21 template<
typename Parent>
32 { this->set_Estimate (0, gain); }
36 {
return this->get_Estimate (0); }
40 { parameter.set_name (name); }
44 { parameter.set_description (name); }
54 {
return "Gain<" + std::string(Parent::Name) +
">"; }
58 typedef typename Parent::Result Return;
61 void calculate (Return& result, std::vector<Return>* gradient);
68template<
typename Parent>
71 parameter.set_name (
"gain");
72 parameter.set_param (1.0);
76template<
typename Parent>
79 result = this->get_param(0);
82 std::cerr <<
"MEAL::Gain::calculate gain=" << result << std::endl;
89 std::cerr <<
"MEAL::Gain::calculate gradient" << std::endl
90 <<
" " << (*grad)[0] << std::endl;
static bool verbose
Verbosity flag.
Definition Function.h:54
void set_gain(const Estimate< double > &gain)
Set the gain.
Definition Gain.h:31
Estimate< double > get_gain() const
Get the gain.
Definition Gain.h:35
std::string get_name() const
Return the name of the class.
Definition Gain.h:53
Gain()
Default constructor.
Definition Gain.h:69
void calculate(Return &result, std::vector< Return > *gradient)
Calculate the result and its gradient.
Definition Gain.h:77
void set_param_name(const std::string &name)
Set the name of the parameter.
Definition Gain.h:39
void set_param_description(const std::string &name)
Set the description of the parameter.
Definition Gain.h:43
Abstract base class implements parameter storage and access.
Definition OneParameter.h:21
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16