AbstractMinimizer< 1 > Class Reference#
|
DiFfRG
|
Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
List of all members
DiFfRG::AbstractMinimizer< 1 > Class Referenceabstract
#include <minimization.hh>
Inheritance diagram for DiFfRG::AbstractMinimizer< 1 >:
Public Member Functions | |
| AbstractMinimizer (const FUN &f, const double abs_tol=1e-4, const int max_iter=1000) | |
| Construct a new AbstractMinimizer object. | |
| AbstractMinimizer (const FUN_ARR &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. | |
| double | minimize () |
| Perform the minimization. | |
Protected Types | |
| using | FUN = std::function<double(const double)> |
| using | FUN_ARR = std::function<double(const std::array<double, 1> &)> |
Protected Member Functions | |
| virtual std::array< double, 1 > | minimize_impl ()=0 |
Protected Attributes | |
| FUN_ARR | f |
| double | abs_tol |
| uint | max_iter |
| uint | iter |
Member Typedef Documentation
◆ FUN
|
protected |
◆ FUN_ARR
|
protected |
Constructor & Destructor Documentation
◆ AbstractMinimizer() [1/2]
|
inline |
Construct a new AbstractMinimizer object.
- Parameters
-
f Objective function to minimize. Must take a double as input and return a double. abs_tol Absolute tolerance for the minimization. max_iter Maximum number of iterations.
◆ AbstractMinimizer() [2/2]
|
inline |
Construct a new AbstractMinimizer object.
- Parameters
-
f Objective function to minimize. Must take a std::array<double, 1> as input and return a double. abs_tol Absolute tolerance for the minimization. max_iter Maximum number of iterations.
Member Function Documentation
◆ get_iter()
|
inline |
Get the number of iterations used in the last minimization.
- Returns
- uint Number of iterations.
◆ minimize()
|
inline |
Perform the minimization.
- Returns
- double Minimimum of the objective function.
◆ minimize_impl()
|
protectedpure virtual |
Implemented in DiFfRG::GSLMinimizer1D.
◆ set_abs_tol()
|
inline |
Set the absolute tolerance for the minimization.
- Parameters
-
abs_tol Absolute tolerance.
◆ set_max_iter()
|
inline |
Set the maximum number of iterations.
- Parameters
-
max_iter Maximum number of iterations.
Member Data Documentation
◆ abs_tol
|
protected |
◆ f
|
protected |
◆ iter
|
protected |
◆ max_iter
|
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