GSLSimplexMinimizer< dim > Class Template Reference#
|
DiFfRG
|
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Types |
List of all members
DiFfRG::GSLSimplexMinimizer< dim > Class Template Reference
Minimizer using the Nelder-Mead simplex algorithm from GSL. More...
#include <minimization.hh>
Inheritance diagram for DiFfRG::GSLSimplexMinimizer< dim >:
Public Member Functions | |
| GSLSimplexMinimizer (const FUN &f, const double abs_tol=1e-4, const int max_iter=1000) | |
| Construct a new GSLSimplexMinimizer object. | |
| void | set_step_size (const double step_size) |
| Set the initial step size for the minimization. | |
| void | set_x0 (const std::array< double, dim > &x0) |
| Set the initial guess for the minimization. | |
Public Member Functions inherited from DiFfRG::AbstractMinimizer< dim > | |
| AbstractMinimizer (const FUN &f, const double abs_tol=1e-4, const int max_iter=1000) | |
| Construct a new AbstractMinimizer object. | |
| void | set_abs_tol (const double abs_tol) |
| Set the absolute tolerance for the minimization. | |
| void | set_max_iter (const uint max_iter) |
| Set the maximum number of iterations. | |
| uint | get_iter () const |
| Get the number of iterations used in the last minimization. | |
| std::array< double, dim > | minimize () |
| Perform the minimization. | |
Static Public Member Functions | |
| static double | gsl_wrap (const gsl_vector *v, void *params) |
Protected Member Functions | |
| virtual std::array< double, dim > | minimize_impl () override |
Protected Member Functions inherited from DiFfRG::AbstractMinimizer< dim > | |
Protected Attributes | |
| std::array< double, dim > | x0 |
| double | step_size |
Protected Attributes inherited from DiFfRG::AbstractMinimizer< dim > | |
| FUN | f |
| double | abs_tol |
| uint | max_iter |
| uint | iter |
Private Types | |
| using | FUN = AbstractMinimizer<dim>::FUN |
Additional Inherited Members | |
Protected Types inherited from DiFfRG::AbstractMinimizer< dim > | |
| using | FUN = std::function<double(const std::array<double, dim> &)> |
Detailed Description
template<int dim>
class DiFfRG::GSLSimplexMinimizer< dim >
class DiFfRG::GSLSimplexMinimizer< dim >
Minimizer using the Nelder-Mead simplex algorithm from GSL.
- Template Parameters
-
dim Dimension of the minimization problem.
Member Typedef Documentation
◆ FUN
template<int dim>
|
private |
Constructor & Destructor Documentation
◆ GSLSimplexMinimizer()
template<int dim>
|
inline |
Construct a new GSLSimplexMinimizer object.
- Parameters
-
f Objective function to minimize. Must take a std::array<double, dim> as input and return a double. abs_tol Absolute tolerance for the minimization. max_iter Maximum number of iterations.
Member Function Documentation
◆ gsl_wrap()
template<int dim>
|
inlinestatic |
◆ minimize_impl()
template<int dim>
|
inlineoverrideprotectedvirtual |
Implements DiFfRG::AbstractMinimizer< dim >.
◆ set_step_size()
template<int dim>
|
inline |
Set the initial step size for the minimization.
- Parameters
-
step_size Initial step size.
◆ set_x0()
template<int dim>
|
inline |
Set the initial guess for the minimization.
- Parameters
-
x0 Initial guess.
Member Data Documentation
◆ step_size
template<int dim>
|
protected |
◆ x0
template<int dim>
|
protected |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/minimization.hh
Generated by
Public Member Functions inherited from