Multidimensional minimization by the Polak-Ribiere conjugate gradient algorithm (GSL) More...
#include <mmin_conp.h>
Public Member Functions | |
virtual int | iterate () |
Perform an iteration. | |
virtual const char * | type () |
Return string denoting type("mmin_conp") | |
![]() | |
virtual int | allocate (size_t n) |
Allocate the memory. | |
virtual int | free () |
Free the allocated memory. | |
int | restart () |
Reset the minimizer to use the current point as a new starting point. | |
virtual int | set (vec_t &x, double u_step_size, double tol_u, func_t &ufunc) |
Set the function and initial guess. More... | |
virtual int | set_de (vec_t &x, double u_step_size, double tol_u, func_t &ufunc, dfunc_t &udfunc) |
Set the function and initial guess. | |
virtual int | mmin (size_t nn, vec_t &xx, double &fmin, func_t &ufunc) |
Calculate the minimum min of func w.r.t the array x of size nvar . | |
virtual int | mmin_de (size_t nn, vec_t &xx, double &fmin, func_t &ufunc, dfunc_t &udfunc) |
Calculate the minimum min of func w.r.t the array x of size nvar . | |
![]() | |
int | base_set (func_t &ufunc, auto_grad_t &u_def_grad) |
Set the function. | |
int | base_set_de (func_t &ufunc, dfunc_t &udfunc) |
Set the function and the gradient. | |
int | base_allocate (size_t nn) |
Allocate memory. | |
int | base_free () |
Clear allocated memory. | |
![]() | |
mmin_base (const mmin_base< func_t, func_t, vec_t > &mb) | |
Copy constructor. | |
int | set_verbose_stream (std::ostream &out, std::istream &in) |
Set streams for verbose I/O. More... | |
virtual int | mmin_de (size_t nvar, vec_t &x, double &fmin, func_t &func, func_t &dfunc) |
Calculate the minimum min of func w.r.t. the array x of size nvar with gradient dfunc . | |
int | print_iter (size_t nv, vec2_t &x, double y, int iter, double value, double limit, std::string comment) |
Print out iteration information. More... | |
const char * | type () |
Return string denoting type ("mmin_base") | |
mmin_base< func_t, func_t, vec_t > & | operator= (const mmin_base< func_t, func_t, vec_t > &mb) |
Copy constructor from operator=. | |
Private Member Functions | |
mmin_conp (const mmin_conp< func_t, vec_t, dfunc_t, auto_grad_t, def_auto_grad_t > &) | |
mmin_conp< func_t, vec_t, dfunc_t, auto_grad_t, def_auto_grad_t > & | operator= (const mmin_conp< func_t, vec_t, dfunc_t, auto_grad_t, def_auto_grad_t > &) |
Additional Inherited Members | |
![]() | |
double | lmin_tol |
Tolerance for the line minimization (default ![]() | |
double | step_size |
Size of the initial step (default 0.01) | |
![]() | |
double | deriv_h |
Stepsize for finite-differencing ( default ![]() | |
int | nmaxiter |
Maximum iterations for line minimization (default 10) | |
def_auto_grad_t | def_grad |
Default automatic gradient object. | |
![]() | |
int | verbose |
Output control. | |
int | ntrial |
Maximum number of iterations. | |
double | tol_rel |
Function value tolerance. | |
double | tol_abs |
The independent variable tolerance. | |
int | last_ntrial |
The number of iterations for in the most recent minimization. | |
bool | err_nonconv |
If true, call the error handler if the routine does not "converge". | |
![]() | |
typedef boost::numeric::ublas::vector< double > | ubvector |
typedef boost::numeric::ublas::matrix< double > | ubmatrix |
![]() | |
void | take_step (const vec_t &x, const vec_t &px, double stepx, double lambda, vec_t &x1x, vec_t &dx) |
Take a step. | |
void | intermediate_point (const vec_t &x, const vec_t &px, double lambda, double pg, double stepa, double stepc, double fa, double fc, vec_t &x1x, vec_t &dx, vec_t &gradient, double *stepx, double *f) |
Line minimization. More... | |
void | min (const vec_t &x, const vec_t &xp, double lambda, double stepa, double stepb, double stepc, double fa, double fb, double fc, double xtol, vec_t &x1x, vec_t &dx1x, vec_t &x2x, vec_t &dx2x, vec_t &gradient, double *xstep, double *f, double *gnorm_u) |
Perform the minimization. More... | |
![]() | |
int | iter |
Iteration number. | |
double | step |
Stepsize. | |
double | tol |
Tolerance. | |
vec_t | x1 |
Desc. | |
vec_t | dx1 |
Desc. | |
vec_t | x2 |
Desc. | |
double | pnorm |
Desc. | |
vec_t | p |
Desc. | |
double | g0norm |
Desc. | |
vec_t | g0 |
Desc. | |
vec_t | ugx |
Proposed minimum. | |
vec_t | ugg |
Gradient. | |
vec_t | udx |
Proposed step. | |
double | it_min |
Desc. | |
![]() | |
func_t * | func |
User-specified function. | |
dfunc_t * | grad |
User-specified gradient. | |
auto_grad_t * | agrad |
Automatic gradient object. | |
bool | grad_given |
If true, a gradient has been specified. | |
size_t | dim |
Memory size. | |
![]() | |
std::ostream * | outs |
Stream for verbose output. | |
std::istream * | ins |
Stream for verbose input. | |
The functions mmin() and mmin_de() min a given function until the gradient is smaller than the value of mmin::tol_rel (which defaults to ).
See an example for the usage of this class in Multidimensional minimizer example .
Definition at line 54 of file mmin_conp.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).