yat  0.20.3pre
Classes | Public Member Functions | Protected Member Functions | List of all members
theplu::yat::utility::MultiMinimizer Class Reference

Wrapper class around gsl_multimin_fminimizer in GSL. More...

#include <yat/utility/MultiMinimizer.h>

Inheritance diagram for theplu::yat::utility::MultiMinimizer:
theplu::yat::utility::NelderMeadSimplex theplu::yat::utility::NelderMeadSimplex2 theplu::yat::utility::NelderMeadSimplex2Rand

Classes

class  Size
 
class  Stopper
 

Public Member Functions

 MultiMinimizer (const MultiMinimizer &)=delete
 Copy is not allowed.
 
MultiMinimizeroperator= (const MultiMinimizer &)=delete
 Assignment is not allowed.
 
unsigned int epochs (void) const
 Number of epochs (iterations) used in last minimisation.
 
const yat::utility::Vectorstep (void) const
 The size of the first step. More...
 
yat::utility::Vectorstep (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...
 

Detailed Description

Wrapper class around gsl_multimin_fminimizer in GSL.

Class is the abstract base class for several minimisation algorithms not using the derivative.

Since
New in yat 0.20

Constructor & Destructor Documentation

◆ MultiMinimizer()

theplu::yat::utility::MultiMinimizer::MultiMinimizer ( const gsl_multimin_fminimizer_type *  t,
size_t  size 
)
protected

Constructor.

Parameters
tdefines type of GSL minimizer
sizeNumber of dimensions in the input space.

Member Function Documentation

◆ operator()() [1/2]

template<class FUNC >
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)

◆ operator()() [2/2]

template<class FUNC >
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).

◆ step() [1/2]

const yat::utility::Vector& theplu::yat::utility::MultiMinimizer::step ( void  ) const

The size of the first step.

See also
parameter step_size in gsl_multimin_fminimizer_set

◆ step() [2/2]

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.


The documentation for this class was generated from the following file:

Generated on Sat Feb 18 2023 03:31:45 for yat by  doxygen 1.8.14