Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_cost_function Class Reference

#include <vnl_cost_function.h>

Inheritance diagram for vnl_cost_function:

Inheritance graph
[legend]
Collaboration diagram for vnl_cost_function:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

An object that represents a function from R^n -> R. It is commonly used to express the interface of a minimizer.

Definition at line 24 of file vnl_cost_function.h.


Constructor & Destructor Documentation

vnl_cost_function::vnl_cost_function int    number_of_unknowns [inline]
 

Definition at line 26 of file vnl_cost_function.h.

virtual vnl_cost_function::~vnl_cost_function   [inline, virtual]
 

Definition at line 28 of file vnl_cost_function.h.

References dim, and f().


Member Function Documentation

virtual void vnl_cost_function::compute const vnl_vector< double > &    x,
double *    f,
vnl_vector< double > *    g
[virtual]
 

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

virtual double vnl_cost_function::f const vnl_vector< double > &    x [virtual]
 

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().

vnl_vector<double> vnl_cost_function::fdgradf const vnl_vector< double > &    x
 

void vnl_cost_function::fdgradf const vnl_vector< double > &    x,
vnl_vector< double > &    gradient,
double    stepsize = 1e-5
 

Compute finite-difference gradient.

int vnl_cost_function::get_number_of_unknowns   const [inline]
 

Return the number of unknowns.

Definition at line 46 of file vnl_cost_function.h.

vnl_vector<double> vnl_cost_function::gradf const vnl_vector< double > &    x
 

Conveniences for printing grad, fdgrad.

virtual void vnl_cost_function::gradf const vnl_vector< double > &    x,
vnl_vector< double > &    gradient
[virtual]
 

Calculate the Jacobian, given the parameter vector x.

Reimplemented in vnl_least_squares_cost_function.

virtual double vnl_cost_function::reported_error double    f_value [inline, virtual]
 

Called when error is printed for user.

Definition at line 54 of file vnl_cost_function.h.


Member Data Documentation

int vnl_cost_function::dim
 

Definition at line 62 of file vnl_cost_function.h.

Referenced by ~vnl_cost_function().


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:13:26 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000