20 r.reference(residual());
26 return sum(residual()*residual())/2.0;
31 firstIndex i1; secondIndex i2;
32 Array<double, 1> ret(sum(
jacobian()(i2,i1) * residual()(i2), i2));
The base class for all problem classes that implement a cost function.
virtual double cost()
Read comments on CostFunc::cost()
blitz::Array< T, 2 > jacobian(const blitz::Array< AutoDerivative< T >, 1 > &Ad)
Utility function to extract the Jacobian as a separate matrix from an array of AutoDerivative.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Apply value function to a blitz array.
The base class for the Non-Linear Least Squares problem.
virtual blitz::Array< double, 1 > gradient()
Read comments on CostFuncDiff::gradient()
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
virtual void residual_jacobian(blitz::Array< double, 1 > &r, blitz::Array< double, 2 > &j)
The residual function and its Jacobian together.