13 storage_(func->get_number_of_residuals()),
14 jacobian_(func->get_number_of_residuals(), func->get_number_of_unknowns()),
An object that represents a function from R^n -> R.
vnl_least_squares_function * f_
vnl_least_squares_function -> vnl_cost_function adaptor
Abstract base for minimising functions.
virtual void gradf(vnl_vector< double > const &x, vnl_matrix< double > &jacobian)
Calculate the Jacobian, given the parameter vector x.
vnl_least_squares_cost_function(vnl_least_squares_function *f)
void gradf(const vnl_vector< double > &x, vnl_vector< double > &gradient) override
Calculate the gradient of f at parameter vector x.
abs_t squared_magnitude() const
Return sum of squares of elements.
vnl_matrix< double > jacobian_
vnl_vector< double > storage_
unsigned int rows() const
Return the number of rows.
bool has_gradient() const
Return true if the derived class has indicated that gradf has been implemented.
virtual void f(vnl_vector< double > const &x, vnl_vector< double > &fx)=0
The main function.
unsigned int columns() const
Return the number of columns.
double f(const vnl_vector< double > &x) override
The main function. Given the parameter vector x, compute the value of f(x).