vnl_powell_1dfun Class Reference

Inheritance diagram for vnl_powell_1dfun:

vnl_cost_function vnl_unary_function< double, vnl_vector< double > > List of all members.

Detailed Description

Definition at line 17 of file vnl_powell.cxx.


Public Member Functions

 vnl_powell_1dfun (int n, vnl_cost_function *f, vnl_powell *p)
void init (vnl_vector< double > const &x0, vnl_vector< double > const &dx)
double f (const vnl_vector< double > &x)
 The main function. Given the parameter vector x, compute the value of f(x).
void uninit (double lambda, vnl_vector< double > &out)
virtual void gradf (vnl_vector< double > const &x, vnl_vector< double > &gradient)
 Calculate the gradient of f at parameter vector x.
vnl_vector< double > gradf (vnl_vector< double > const &x)
 Conveniences for printing grad, fdgrad.
virtual void compute (vnl_vector< double > const &x, double *f, vnl_vector< double > *g)
 Compute one or both of f and g.
int get_number_of_unknowns () const
 Return the number of unknowns.
void fdgradf (vnl_vector< double > const &x, vnl_vector< double > &gradient, double stepsize=1e-5)
 Compute finite-difference gradient.
vnl_vector< double > fdgradf (vnl_vector< double > const &x)
virtual double reported_error (double f_value)
 Called when error is printed for user.
virtual double get_range_min () const
 Return bounding cube of range (outputs).
virtual double get_range_max () const
virtual vnl_unary_function<
double, vnl_vector< double > > * 
Copy () const
 Copy should allocate a copy of this on the heap and return it.

Public Attributes

vnl_powellpowell_
vnl_cost_functionf_
unsigned int n_
vnl_vector< double > x0_
vnl_vector< double > dx_
vnl_vector< double > tmpx_
int dim

Protected Member Functions

void set_number_of_unknowns (int number_of_unknowns)
 Set number of unknowns.

Constructor & Destructor Documentation

vnl_powell_1dfun::vnl_powell_1dfun ( int  n,
vnl_cost_function f,
vnl_powell p 
) [inline]

Definition at line 26 of file vnl_powell.cxx.


Member Function Documentation

void vnl_powell_1dfun::init ( vnl_vector< double > const &  x0,
vnl_vector< double > const &  dx 
) [inline]

Definition at line 29 of file vnl_powell.cxx.

double vnl_powell_1dfun::f ( const vnl_vector< double > &  x  )  [inline, virtual]

The main function. Given the parameter vector x, compute the value of f(x).

..

Reimplemented from vnl_cost_function.

Definition at line 37 of file vnl_powell.cxx.

void vnl_powell_1dfun::uninit ( double  lambda,
vnl_vector< double > &  out 
) [inline]

Definition at line 45 of file vnl_powell.cxx.

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

Calculate the gradient of f at parameter vector x.

Reimplemented in vnl_least_squares_cost_function.

Definition at line 36 of file vnl_cost_function.cxx.

vnl_vector< double > vnl_cost_function::gradf ( vnl_vector< double > const &  x  )  [inherited]

Conveniences for printing grad, fdgrad.

Definition at line 67 of file vnl_cost_function.cxx.

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

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

Definition at line 16 of file vnl_cost_function.cxx.

int vnl_cost_function::get_number_of_unknowns (  )  const [inline, inherited]

Return the number of unknowns.

Definition at line 50 of file vnl_cost_function.h.

void vnl_cost_function::fdgradf ( vnl_vector< double > const &  x,
vnl_vector< double > &  gradient,
double  stepsize = 1e-5 
) [inherited]

Compute finite-difference gradient.

Definition at line 46 of file vnl_cost_function.cxx.

vnl_vector< double > vnl_cost_function::fdgradf ( vnl_vector< double > const &  x  )  [inherited]

Definition at line 74 of file vnl_cost_function.cxx.

virtual double vnl_cost_function::reported_error ( double  f_value  )  [inline, virtual, inherited]

Called when error is printed for user.

Definition at line 56 of file vnl_cost_function.h.

void vnl_cost_function::set_number_of_unknowns ( int  number_of_unknowns  )  [inline, protected, inherited]

Set number of unknowns.

Definition at line 65 of file vnl_cost_function.h.

virtual double vnl_unary_function< double , vnl_vector< double > >::get_range_min (  )  const [virtual, inherited]

Return bounding cube of range (outputs).

virtual double vnl_unary_function< double , vnl_vector< double > >::get_range_max (  )  const [virtual, inherited]

Return bounding cube of range (outputs).

virtual vnl_unary_function<double , vnl_vector< double > >* vnl_unary_function< double , vnl_vector< double > >::Copy (  )  const [inline, virtual, inherited]

Copy should allocate a copy of this on the heap and return it.

If Subclasses do not implement this function, it will return null, but many applications will never call it, so this may not be a problem for you.

Definition at line 46 of file vnl_unary_function.h.


Member Data Documentation

vnl_powell* vnl_powell_1dfun::powell_

Definition at line 20 of file vnl_powell.cxx.

vnl_cost_function* vnl_powell_1dfun::f_

Definition at line 21 of file vnl_powell.cxx.

unsigned int vnl_powell_1dfun::n_

Definition at line 22 of file vnl_powell.cxx.

vnl_vector<double> vnl_powell_1dfun::x0_

Definition at line 23 of file vnl_powell.cxx.

vnl_vector<double> vnl_powell_1dfun::dx_

Definition at line 24 of file vnl_powell.cxx.

vnl_vector<double> vnl_powell_1dfun::tmpx_

Definition at line 25 of file vnl_powell.cxx.

int vnl_cost_function::dim [inherited]

Definition at line 68 of file vnl_cost_function.h.


The documentation for this class was generated from the following file:
Generated on Sat Nov 22 05:06:29 2008 for core/vnl by  doxygen 1.5.1