yat
0.20.3pre
|
Wrapper class around gsl_multimin_fminimizer in GSL. More...
#include <yat/utility/MultiMinimizer.h>
Classes | |
class | Size |
class | Stopper |
Public Member Functions | |
MultiMinimizer (const MultiMinimizer &)=delete | |
Copy is not allowed. | |
MultiMinimizer & | operator= (const MultiMinimizer &)=delete |
Assignment is not allowed. | |
unsigned int | epochs (void) const |
Number of epochs (iterations) used in last minimisation. | |
const yat::utility::Vector & | step (void) const |
The size of the first step. More... | |
yat::utility::Vector & | step (void) |
Modify the initial step size. More... | |
template<class FUNC > | |
void | operator() (yat::utility::VectorMutable &x, FUNC &func, Stopper &&stopper) |
template<class FUNC > | |
void | operator() (yat::utility::VectorMutable &, FUNC &func, Stopper &&stopper, unsigned int max_epochs) |
Protected Member Functions | |
MultiMinimizer (const gsl_multimin_fminimizer_type *t, size_t size) | |
Constructor. More... | |
Wrapper class around gsl_multimin_fminimizer in GSL.
Class is the abstract base class for several minimisation algorithms not using the derivative.
|
protected |
Constructor.
t | defines type of GSL minimizer |
size | Number of dimensions in the input space. |
void theplu::yat::utility::MultiMinimizer::operator() | ( | yat::utility::VectorMutable & | x, |
FUNC & | func, | ||
MultiMinimizer::Stopper && | stopper | ||
) |
Function finds an x
that minimizes the function defined by func
. It calls gsl_multimin_fminimizer_iterate until either GSL_ENOPROG
is returned or the stopper
returns true.
Type Requirements:
FUNC
must have an operator double operator()(const VectorBase& x) void theplu::yat::utility::MultiMinimizer::operator() | ( | yat::utility::VectorMutable & | x, |
FUNC & | func, | ||
MultiMinimizer::Stopper && | stopper, | ||
unsigned int | max_epochs | ||
) |
Same as operator()(yat::utility::VectorMutable&, FUNC& func, Stopper&&); but at maximum run max_epochs
epochs (iterations).
const yat::utility::Vector& theplu::yat::utility::MultiMinimizer::step | ( | void | ) | const |
The size of the first step.
step_size
in gsl_multimin_fminimizer_set yat::utility::Vector& theplu::yat::utility::MultiMinimizer::step | ( | void | ) |
Modify the initial step size.
The size of the vector cannot be modified but must equal the size set in constructor.