#include <gsl_mmin_simp.h>
vec_t
=
ovector_view. Definition at line 49 of file gsl_mmin_simp.h.
Public Member Functions | |
virtual int | mmin (size_t nn, vec_t &xx, double &fmin, param_t &pa, func_t &ufunc) |
Calculate the minimum min of func w.r.t the array x of size nvar . | |
virtual int | mmin_twovec (size_t nn, vec_t &xx, vec_t &xx2, double &fmin, param_t &pa, func_t &ufunc) |
Calculate the minimum min of func w.r.t the array x of size nvar , using xx and xx2 to specify the simplex. | |
virtual int | allocate (size_t n) |
Allocate the memory. | |
virtual int | free () |
Free the allocated memory. | |
virtual int | set (func_t &ufunc, param_t &pa, vec_t &ax, vec_t &step_size) |
Set the function and initial guess. | |
virtual int | iterate () |
Perform an iteration. | |
virtual int | print_iter (size_t nv, vec_t &xx, double y, int iter, double value, double limit, std::string comment) |
Print out iteration information. | |
virtual const char * | type () |
Return string denoting type("gsl_mmin_simp"). | |
Data Fields | |
double | initial_step |
The initial stepsize (default 1.0). | |
int | print_simplex |
Print simplex information in print_iter() (default 0). | |
Protected Member Functions | |
virtual double | move_corner (const double coeff, const simp_state_t *state, size_t corner, gsl_vector *xc, func_t &f, size_t nvar, param_t &pa) |
Move a corner of a simplex. | |
virtual int | contract_by_best (simp_state_t *state, size_t best, gsl_vector *xc, func_t &f, size_t nvar, param_t &pa) |
Contract the simplex towards the best point. | |
Protected Attributes | |
size_t | dim |
Number of variables to be minimized over. | |
gsl_vector * | x |
Present minimum vector. | |
double | fval |
Function value at minimum. | |
func_t * | func |
Function. | |
param_t * | params |
Parameters. | |
bool | set_called |
True if set() has been called. | |
double | size |
Size of simplex. | |
simp_state_t | lstate |
Simplex state storage. |
virtual double move_corner | ( | const double | coeff, | |
const simp_state_t * | state, | |||
size_t | corner, | |||
gsl_vector * | xc, | |||
func_t & | f, | |||
size_t | nvar, | |||
param_t & | pa | |||
) | [inline, protected, virtual] |
Move a corner of a simplex.
Moves a simplex corner scaled by coeff (negative value represents mirroring by the middle point of the "other" corner points) and gives new corner in xc and function value at xc as a return value.
Definition at line 65 of file gsl_mmin_simp.h.
virtual int contract_by_best | ( | simp_state_t * | state, | |
size_t | best, | |||
gsl_vector * | xc, | |||
func_t & | f, | |||
size_t | nvar, | |||
param_t & | pa | |||
) | [inline, protected, virtual] |
Contract the simplex towards the best point.
Function contracts the simplex in respect to best valued corner. All corners besides the best corner are moved.
The vector, xc
, is used as work space.
Definition at line 105 of file gsl_mmin_simp.h.
virtual int print_iter | ( | size_t | nv, | |
vec_t & | xx, | |||
double | y, | |||
int | iter, | |||
double | value, | |||
double | limit, | |||
std::string | comment | |||
) | [inline, virtual] |
Print out iteration information.
Depending on the value of the variable verbose, this prints out the iteration information. If verbose=0, then no information is printed, while if verbose>1, then after each iteration, the present values of x and y are output to std::cout along with the iteration number. If verbose>=2 then each iteration waits for a character.
Definition at line 525 of file gsl_mmin_simp.h.
int print_simplex |
Print simplex information in print_iter() (default 0).
If this is 1 and verbose is greater than 0, then print_iter() will print the function values at all the simplex points.
Definition at line 179 of file gsl_mmin_simp.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page