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, const double &t=3.0E-8) | |
void | bracket (const double &ax, const double &xx, eng_pointer eng) |
Bracket the minium. More... | |
double | search (eng_pointer eng) |
Find the minimum between two brackets. More... | |
Private Types | |
typedef double(FCLASS::* | eng_pointer) (const double &val) |
This is the type specifier for the function to minimise. More... | |
Private Attributes | |
double | ax |
Three points bracketting the minimum and the corresponding function values. More... | |
bool | bracketed |
Has the minimum been bracketed. More... | |
double | bx |
const double | EPS |
A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero. More... | |
const double | EXPAND |
The factor by which to expand the range when bracketing. More... | |
double | fa |
double | fb |
const unsigned | ITMAX |
Maximum number of interactions in line minimiser. More... | |
FCLASS | myclass_func |
The class containing the function we are trying to minimise. More... | |
double | tol |
The tolerance for the line minimiser. More... | |
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 | ( | const double & | ax, |
const 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 |
|
private |
A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero.
|
private |
The factor by which to expand the range when bracketing.
|
private |
|
private |
|
private |
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.8.17 |