A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method. More...
#include <Brent1DRootSearch.h>
Public Member Functions | |
| Brent1DRootSearch (const FCLASS &pf, double t=3.0E-8) | |
| void | bracket (double ax, double xx, eng_pointer eng) |
| Bracket the minium. | |
| double | search (eng_pointer eng) |
| Find the minimum between two brackets. | |
Private Types | |
| typedef double(FCLASS::* | eng_pointer) (const double &val) |
| This is the type specifier for the function to minimise. | |
Private Attributes | |
| double | ax =0.0 |
| Three points bracketting the minimum and the corresponding function values. | |
| bool | bracketed =false |
| Has the minimum been bracketed. | |
| double | bx =0.0 |
| double | fa =0.0 |
| double | fb =0.0 |
| FCLASS | myclass_func |
| The class containing the function we are trying to minimise. | |
| double | tol |
| The tolerance for the line minimiser. | |
Static Private Attributes | |
| static constexpr double | EPS =3.0e-8 |
| A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero. | |
| static constexpr double | EXPAND =1.6 |
| The factor by which to expand the range when bracketing. | |
| static constexpr unsigned | ITMAX =100 |
| Maximum number of interactions in line minimiser. | |
A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method.
|
private |
This is the type specifier for the function to minimise.
|
explicit |
| void PLMD::Brent1DRootSearch< FCLASS >::bracket | ( | double | ax, |
| double | xx, | ||
| eng_pointer | eng ) |
Bracket the minium.
| double PLMD::Brent1DRootSearch< FCLASS >::search | ( | eng_pointer | eng | ) |
Find the minimum between two brackets.
|
private |
Three points bracketting the minimum and the corresponding function values.
|
private |
Has the minimum been bracketed.
|
private |
|
staticconstexprprivate |
A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero.
|
staticconstexprprivate |
The factor by which to expand the range when bracketing.
|
private |
|
private |
|
staticconstexprprivate |
Maximum number of interactions in line minimiser.
|
private |
The class containing the function we are trying to minimise.
|
private |
The tolerance for the line minimiser.
Hosted by GitHub
|
1.13.2
|