#include <vnl_cost_function.h>
Inheritance diagram for vnl_cost_function:
Public Methods | |
vnl_cost_function (int number_of_unknowns) | |
virtual | ~vnl_cost_function () |
virtual double | f (const vnl_vector< double > &x) |
virtual void | gradf (const vnl_vector< double > &x, vnl_vector< double > &gradient) |
virtual void | compute (const vnl_vector< double > &x, double *f, vnl_vector< double > *g) |
int | get_number_of_unknowns () const |
void | fdgradf (const vnl_vector< double > &x, vnl_vector< double > &gradient, double stepsize=1e-5) |
virtual double | reported_error (double f_value) |
vnl_vector< double > | gradf (const vnl_vector< double > &x) |
vnl_vector< double > | fdgradf (const vnl_vector< double > &x) |
Public Attributes | |
int | dim |
Definition at line 24 of file vnl_cost_function.h.
|
Definition at line 26 of file vnl_cost_function.h. |
|
Definition at line 28 of file vnl_cost_function.h. |
|
Compute one or both of f and g.\ Normally implemented in terms of the above two,. but may be faster if specialized. f != 0 => compute f |
|
The main function.\ Given the parameter vector x, compute the. value of f(x). Reimplemented in vnl_least_squares_cost_function. Referenced by ~vnl_cost_function(). |
|
|
|
Compute finite-difference gradient. |
|
Return the number of unknowns. Definition at line 46 of file vnl_cost_function.h. |
|
Conveniences for printing grad, fdgrad. |
|
Calculate the Jacobian, given the parameter vector x. Reimplemented in vnl_least_squares_cost_function. |
|
Called when error is printed for user. Definition at line 54 of file vnl_cost_function.h. |
|
Definition at line 62 of file vnl_cost_function.h. Referenced by ~vnl_cost_function(). |