Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
vnl_amoebaFit Struct Reference
Inheritance diagram for vnl_amoebaFit:
Inheritance graph
[legend]

Public Member Functions

 vnl_amoebaFit (vnl_amoeba &a)
 
void set_up_simplex_relative (std::vector< vnl_amoeba_SimplexCorner > &simplex, const vnl_vector< double > &x)
 Initialise the simplex given one corner, x (scale each element to get other corners). More...
 
void set_up_simplex_absolute (std::vector< vnl_amoeba_SimplexCorner > &simplex, const vnl_vector< double > &x, const vnl_vector< double > &dx)
 Initialise the simplex given one corner, x and displacements of others. More...
 
void amoeba (vnl_vector< double > &x)
 Perform optimisation. Start simplex defined by scaling elements of x. More...
 
void amoeba (vnl_vector< double > &x, const vnl_vector< double > &dx)
 Perform optimisation. Start simplex defined by adding dx[i] to each x[i]. More...
 
void amoeba (vnl_vector< double > &x, std::vector< vnl_amoeba_SimplexCorner > &simplex)
 Perform optimisation, given simplex to start. More...
 
double f (const vnl_vector< double > &x)
 
void set_corner (vnl_amoeba_SimplexCorner *s, const vnl_vector< double > &v)
 
void set_corner_a_plus_bl (vnl_amoeba_SimplexCorner *s, const vnl_vector< double > &vbar, const vnl_vector< double > &v, double lambda)
 
void set_max_iterations (int n)
 Define maximum number of iterations to use. More...
 
void set_x_tolerance (double tol)
 Define tolerance on elements of x. More...
 
void set_f_tolerance (double tol)
 Define tolerance on function evaluation. More...
 
void set_relative_diameter (double r)
 Define scaling used to select starting vertices relative to initial x0. More...
 
void set_zero_term_delta (double d)
 
void minimize (vnl_vector< double > &x)
 Modify x to minimise function supplied in constructor. More...
 
void minimize (vnl_vector< double > &x, const vnl_vector< double > &dx)
 Perform optimisation. More...
 
double get_end_error () const
 
int get_num_evaluations () const
 Number of evaluations used in last call to minimize. More...
 

Static Public Member Functions

static void minimize (vnl_cost_function &f, vnl_vector< double > &x)
 Modify x so as to minimise f(x). More...
 
static void minimize (vnl_cost_function &f, vnl_vector< double > &x, const vnl_vector< double > &dx)
 Modify x so as to minimise f(x). More...
 
static void minimize (vnl_cost_function &f, vnl_vector< double > &x, double delta)
 Modify x so as to minimise f(x). More...
 
static void minimize (vnl_least_squares_function &f, vnl_vector< double > &x)
 Modify x so as to minimise f(x). More...
 

Public Attributes

int cnt
 
int verbose
 
int maxiter
 
double X_tolerance
 
double F_tolerance
 
double relative_diameter
 Scaling used to select starting vertices relative to initial x0. More...
 
double zero_term_delta
 

Static Public Attributes

static bool default_verbose = false
 

Protected Attributes

vnl_cost_functionfptr
 
double end_error_
 
int num_evaluations_
 

Detailed Description

Definition at line 31 of file vnl_amoeba.cxx.

Constructor & Destructor Documentation

◆ vnl_amoebaFit()

vnl_amoebaFit::vnl_amoebaFit ( vnl_amoeba a)
inline

Definition at line 35 of file vnl_amoeba.cxx.

Member Function Documentation

◆ amoeba() [1/3]

void vnl_amoebaFit::amoeba ( vnl_vector< double > &  x)

Perform optimisation. Start simplex defined by scaling elements of x.

FMINS Minimize a function of several variables.

FMINS('F',X0) attempts to return a vector x which is a local minimizer of F(x) near the starting vector X0. 'F' is a string containing the name of the objective function to be minimized. F(x) should be a scalar valued function of a vector variable.

FMINS('F',X0,OPTIONS) uses a vector of control parameters. If OPTIONS(1) is nonzero, intermediate steps in the solution are displayed; the default is OPTIONS(1) = 0. OPTIONS(2) is the termination tolerance for x; the default is 1.e-4. OPTIONS(3) is the termination tolerance for F(x); the default is 1.e-4. OPTIONS(14) is the maximum number of steps; the default is OPTIONS(14) = 500. The other components of OPTIONS are not used as input control parameters by FMIN. For more information, see FOPTIONS.

FMINS('F',X0,OPTIONS,[],P1,P2,...) provides for up to 10 additional arguments which are passed to the objective function, F(X,P1,P2,...)

FMINS uses a simplex search method.

See also FMIN.

Reference: J. E. Dennis, Jr. and D. J. Woods, New Computing Environments: Microcomputers in Large-Scale Computing, edited by A. Wouk, SIAM, 1987, pp. 116-122.

Definition at line 222 of file vnl_amoeba.cxx.

◆ amoeba() [2/3]

void vnl_amoebaFit::amoeba ( vnl_vector< double > &  x,
const vnl_vector< double > &  dx 
)

Perform optimisation. Start simplex defined by adding dx[i] to each x[i].

Definition at line 232 of file vnl_amoeba.cxx.

◆ amoeba() [3/3]

void vnl_amoebaFit::amoeba ( vnl_vector< double > &  x,
std::vector< vnl_amoeba_SimplexCorner > &  simplex 
)

Perform optimisation, given simplex to start.

Definition at line 243 of file vnl_amoeba.cxx.

◆ f()

double vnl_amoebaFit::f ( const vnl_vector< double > &  x)
inline

Definition at line 57 of file vnl_amoeba.cxx.

◆ get_end_error()

double vnl_amoeba::get_end_error ( ) const
inlineinherited

Definition at line 80 of file vnl_amoeba.h.

◆ get_num_evaluations()

int vnl_amoeba::get_num_evaluations ( ) const
inlineinherited

Number of evaluations used in last call to minimize.

Definition at line 83 of file vnl_amoeba.h.

◆ minimize() [1/6]

void vnl_amoeba::minimize ( vnl_vector< double > &  x)
inherited

Modify x to minimise function supplied in constructor.

Start simplex defined by scaling elements of x

Definition at line 347 of file vnl_amoeba.cxx.

◆ minimize() [2/6]

void vnl_amoeba::minimize ( vnl_vector< double > &  x,
const vnl_vector< double > &  dx 
)
inherited

Perform optimisation.

Perform optimisation. Start simplex defined by adding dx[i] to each x[i].

Start simplex defined by adding dx[i] to each x[i]

Definition at line 356 of file vnl_amoeba.cxx.

◆ minimize() [3/6]

void vnl_amoeba::minimize ( vnl_cost_function f,
vnl_vector< double > &  x 
)
staticinherited

Modify x so as to minimise f(x).

Static method.

Definition at line 366 of file vnl_amoeba.cxx.

◆ minimize() [4/6]

void vnl_amoeba::minimize ( vnl_cost_function f,
vnl_vector< double > &  x,
const vnl_vector< double > &  dx 
)
staticinherited

Modify x so as to minimise f(x).

Static method.

Start simplex defined by adding dx[i] to each x[i]

Definition at line 383 of file vnl_amoeba.cxx.

◆ minimize() [5/6]

void vnl_amoeba::minimize ( vnl_cost_function f,
vnl_vector< double > &  x,
double  delta 
)
staticinherited

Modify x so as to minimise f(x).

Static method.

delta defines relative size of initial simplex ie the i'th vertex has xi[i] = x[i]*(1+delta)

Definition at line 372 of file vnl_amoeba.cxx.

◆ minimize() [6/6]

void vnl_amoeba::minimize ( vnl_least_squares_function f,
vnl_vector< double > &  x 
)
staticinherited

Modify x so as to minimise f(x).

Definition at line 410 of file vnl_amoeba.cxx.

◆ set_corner()

void vnl_amoebaFit::set_corner ( vnl_amoeba_SimplexCorner s,
const vnl_vector< double > &  v 
)
inline

Definition at line 61 of file vnl_amoeba.cxx.

◆ set_corner_a_plus_bl()

void vnl_amoebaFit::set_corner_a_plus_bl ( vnl_amoeba_SimplexCorner s,
const vnl_vector< double > &  vbar,
const vnl_vector< double > &  v,
double  lambda 
)
inline

Definition at line 68 of file vnl_amoeba.cxx.

◆ set_f_tolerance()

void vnl_amoeba::set_f_tolerance ( double  tol)
inlineinherited

Define tolerance on function evaluation.

Definition at line 58 of file vnl_amoeba.h.

◆ set_max_iterations()

void vnl_amoeba::set_max_iterations ( int  n)
inlineinherited

Define maximum number of iterations to use.

Definition at line 52 of file vnl_amoeba.h.

◆ set_relative_diameter()

void vnl_amoeba::set_relative_diameter ( double  r)
inlineinherited

Define scaling used to select starting vertices relative to initial x0.

I.e. the i'th vertex has x[i] = x0[i]*(1+relative_diameter)

Definition at line 62 of file vnl_amoeba.h.

◆ set_up_simplex_absolute()

void vnl_amoebaFit::set_up_simplex_absolute ( std::vector< vnl_amoeba_SimplexCorner > &  simplex,
const vnl_vector< double > &  x,
const vnl_vector< double > &  dx 
)

Initialise the simplex given one corner, x and displacements of others.

Definition at line 176 of file vnl_amoeba.cxx.

◆ set_up_simplex_relative()

void vnl_amoebaFit::set_up_simplex_relative ( std::vector< vnl_amoeba_SimplexCorner > &  simplex,
const vnl_vector< double > &  x 
)

Initialise the simplex given one corner, x (scale each element to get other corners).

Initialise the simplex given one corner, x.

Definition at line 149 of file vnl_amoeba.cxx.

◆ set_x_tolerance()

void vnl_amoeba::set_x_tolerance ( double  tol)
inlineinherited

Define tolerance on elements of x.

Definition at line 55 of file vnl_amoeba.h.

◆ set_zero_term_delta()

void vnl_amoeba::set_zero_term_delta ( double  d)
inlineinherited

Definition at line 64 of file vnl_amoeba.h.

Member Data Documentation

◆ cnt

int vnl_amoebaFit::cnt

Definition at line 33 of file vnl_amoeba.cxx.

◆ default_verbose

bool vnl_amoeba::default_verbose = false
staticinherited

Definition at line 103 of file vnl_amoeba.h.

◆ end_error_

double vnl_amoeba::end_error_
protectedinherited

Definition at line 107 of file vnl_amoeba.h.

◆ F_tolerance

double vnl_amoeba::F_tolerance
inherited

Definition at line 49 of file vnl_amoeba.h.

◆ fptr

vnl_cost_function* vnl_amoeba::fptr
protectedinherited

Definition at line 106 of file vnl_amoeba.h.

◆ maxiter

int vnl_amoeba::maxiter
inherited

Definition at line 47 of file vnl_amoeba.h.

◆ num_evaluations_

int vnl_amoeba::num_evaluations_
protectedinherited

Definition at line 108 of file vnl_amoeba.h.

◆ relative_diameter

double vnl_amoeba::relative_diameter
inherited

Scaling used to select starting vertices relative to initial x0.

I.e. the i'th vertex has x[i] = x0[i]*(1+relative_diameter)

Definition at line 67 of file vnl_amoeba.h.

◆ verbose

int vnl_amoeba::verbose
inherited

Definition at line 46 of file vnl_amoeba.h.

◆ X_tolerance

double vnl_amoeba::X_tolerance
inherited

Definition at line 48 of file vnl_amoeba.h.

◆ zero_term_delta

double vnl_amoeba::zero_term_delta
inherited

Definition at line 68 of file vnl_amoeba.h.


The documentation for this struct was generated from the following file: