1 #ifndef COST_FUNC_DIFF_H 2 #define COST_FUNC_DIFF_H 63 virtual blitz::Array<double, 1>
gradient() = 0;
82 virtual blitz::Array<double, 1>
gradient_x(
const blitz::Array<double, 1>& x)
109 double& c, blitz::Array<double, 1>&
g);
129 double& c, blitz::Array<double, 1>& g)
165 virtual void print(std::ostream& Os)
const 166 { Os <<
"CostFuncDiff"; }
virtual void set_num_der1_evaluations(int count)
Sets the gradient evaluation counter to a desired value.
virtual void zero_num_evaluations()
Sets cost and gradient evaluation counters to zero.
The base class for all problem classes that implement a cost function.
virtual int gradient_size() const
Returns the size of the gradient vector.
virtual void increment_num_der1_evaluations()
Increments (by 1) gradient evaluation counter.
virtual blitz::Array< double, 1 > parameters() const
Returns the current parameters.
virtual int num_der1_evaluations() const
Returns the number of the times gradient has been evaluated.
virtual void cost_gradient(double &c, blitz::Array< double, 1 > &g)
The cost function and its gradient together.
virtual void zero_num_evaluations()
Sets cost evaluation counter to zero.
virtual blitz::Array< double, 1 > gradient()=0
The gradient of the cost function.
The base class for all problem classes that implement a cost function and its gradient.
virtual void print(std::ostream &Os) const
Prints description of object.
virtual blitz::Array< double, 1 > gradient_x(const blitz::Array< double, 1 > &x)
The gradient function with parameters.
const Unit g("g", 1e-3 *kg)
Contains classes to abstract away details in various Spurr Radiative Transfer software.
CostFuncDiff()
Default Constructor.
virtual void cost_gradient_x(const blitz::Array< double, 1 > &x, double &c, blitz::Array< double, 1 > &g)
The cost function and its gradient with parameters.
virtual int expected_parameter_size() const
Returns the expected size of the parameters.