DiFfRG
|
Abstract class for minimization in arbitrary dimensions. More...
#include <minimization.hh>
Public Member Functions | |
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. | |
Protected Types | |
using | FUN = std::function<double(const std::array<double, dim> &)> |
Protected Member Functions | |
virtual std::array< double, dim > | minimize_impl ()=0 |
Protected Attributes | |
FUN | f |
double | abs_tol |
uint | max_iter |
uint | iter |
Abstract class for minimization in arbitrary dimensions.
dim | Dimension of the minimization problem. |
|
protected |
|
inline |
Construct a new AbstractMinimizer object.
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. |
|
inline |
Get the number of iterations used in the last minimization.
|
inline |
Perform the minimization.
|
protectedpure virtual |
Implemented in DiFfRG::GSLSimplexMinimizer< dim >.
|
inline |
Set the absolute tolerance for the minimization.
abs_tol | Absolute tolerance. |
|
inline |
Set the maximum number of iterations.
max_iter | Maximum number of iterations. |
|
protected |
|
protected |
|
protected |
|
protected |