yat
0.20.3pre
|
Wrapper class around gsl_multimin_fdfminimizer in GSL. More...
#include <yat/utility/MultiMinimizerDerivative.h>
Classes | |
class | Gradient |
class | Stopper |
Public Member Functions | |
MultiMinimizerDerivative (const MultiMinimizerDerivative &)=delete | |
Copy is not allowed. | |
MultiMinimizerDerivative & | operator= (const MultiMinimizerDerivative &)=delete |
Assignment not allowed. | |
unsigned int | epochs (void) const |
Number of epochs (iterations) used in last minimisation. | |
double | step_size (void) const |
void | step_size (double ss) |
double | tolerance (void) const |
void | tolerance (double tol) |
template<class FUNC > | |
void | operator() (yat::utility::VectorMutable &, FUNC &func, MultiMinimizerDerivative::Stopper &&stopper) |
template<class FUNC > | |
void | operator() (yat::utility::VectorMutable &, FUNC &func, MultiMinimizerDerivative::Stopper &&stopper, unsigned int max_epochs) |
Protected Member Functions | |
MultiMinimizerDerivative (const gsl_multimin_fdfminimizer_type *t, size_t size) | |
Constructor. More... | |
Wrapper class around gsl_multimin_fdfminimizer in GSL.
Class is the abstract base class for several minimisation algorithms using the derivative.
|
protected |
Constructor.
t | defines type of GSL minimizer |
size | Number of dimensions in the input space. |
void theplu::yat::utility::MultiMinimizerDerivative::operator() | ( | yat::utility::VectorMutable & | x, |
FUNC & | func, | ||
MultiMinimizerDerivative::Stopper && | stopper | ||
) |
Function finds an x
that minimizes the function defined by func
. It calls gsl_multimin_fdfminimizer_iterate until either GSL_ENOPROG
is returned or the norm of the gradient is smaller than epsabs
, as tested by gsl_multimin_test_gradient.
Type Requirements:
FUNC
must have an operator defining the function double operator()(const VectorBase& x)FUNC
must have an operator defining the gradient void operator()(const VectorBase& x, VectorMutable&) void theplu::yat::utility::MultiMinimizerDerivative::operator() | ( | yat::utility::VectorMutable & | x, |
FUNC & | func, | ||
MultiMinimizerDerivative::Stopper && | stopper, | ||
unsigned int | max_epochs | ||
) |
Same as operator()(yat::utility::VectorMutable&, FUNC& func, double epsabs) but iterate at maximum max_epochs
iterations.
double theplu::yat::utility::MultiMinimizerDerivative::step_size | ( | void | ) | const |
The size of the first trial step is given by step_size
void theplu::yat::utility::MultiMinimizerDerivative::step_size | ( | double | ss | ) |
The size of the first trial step is given by step_size
double theplu::yat::utility::MultiMinimizerDerivative::tolerance | ( | void | ) | const |
The accuracy of the line minimization is specified by tolerance
void theplu::yat::utility::MultiMinimizerDerivative::tolerance | ( | double | tol | ) |
The accuracy of the line minimization is specified by tolerance