KJB
|
Wrapper for GSL's multidimensional minimizer, without using gradient. More...
#include <gsl_multimin.h>
Public Member Functions | |
Gsl_Multimin_f (const gsl_multimin_fminimizer_type *type, gsl_multimin_function *f, const gsl_vector *x0, const gsl_vector *step_size, bool verbosity=true) | |
ctor builds the minimizer by allocating and setting up params More... | |
Gsl_Multimin_f (size_t size, const gsl_multimin_fminimizer_type *type=gsl_multimin_fminimizer_nmsimplex2) | |
void | initialize (gsl_multimin_function *f, const gsl_vector *x0, const gsl_vector *step_size) |
size_t | dim () const |
int | iterate () |
Perform one iteration of the minimizer. More... | |
gsl_vector * | argmin () const |
query the current best argmin of the minimizer More... | |
virtual double | min () const |
query the current best min value of the function to be minimized More... | |
const char * | name () const |
access a string describing the algorithm More... | |
int | test_size (double epsabs) const |
check the magnitude the minimizer specific characteristic size against the tolerance epsabs. More... | |
void | swap (Gsl_Multimin_f &that) |
Swap the contents of this minimizer and another (fast). More... | |
bool | verbosity (bool v) |
Alter the verbosity attribute of the object. More... | |
Wrapper for GSL's multidimensional minimizer, without using gradient.
GSL is the GNU Scientific Library.
This object is not copyable or assignable, but it does have a swap() method.
|
inline |
ctor builds the minimizer by allocating and setting up params
type | indicates the minimization algorithm you would like to use; supported choices are listed at the link below: http://www.gnu.org/software/gsl/manual/html_node/Multimin-Algorithms-with-Derivatives.html |
x0 | Initial vector location in domain from which search begins. |
step_size | please see the GSL documentation, or use clarivoyance, to determine what this should be set to; apparently it controls the size of (only) the first step. |
tol | please see the GSL documentation for this one too. |
verbosity | If true, then a bad iterate() call will emit a message to stderr. |
KJB_error | if the input is bad: e.g., x0 equal to NULL or cannot allocate memory. |
|
inline |
|
inline |
query the current best argmin of the minimizer
|
inline |
|
inline |
|
inline |
Perform one iteration of the minimizer.
If you want to throw an exception in the case of a failed iteration, consider using the GSL_ETX macro.
|
inlinevirtual |
query the current best min value of the function to be minimized
Reimplemented in kjb::Generic_multimin< T >.
|
inline |
access a string describing the algorithm
|
inline |
Swap the contents of this minimizer and another (fast).
This method is useful if, for example, you want to restart the minimizer at a new location; just instantiate a new minimizer object at the new location and swap() it with the old minimizer object.
|
inline |
check the magnitude the minimizer specific characteristic size against the tolerance epsabs.
|
inline |
Alter the verbosity attribute of the object.