A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method. More...
#include <Minimise1DBrent.h>
Public Member Functions | |
Minimise1DBrent (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 | getMinimumValue () const |
Return the value of the function at the minimum. More... | |
double | minimise (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 | CGOLD |
The value of the golden ratio. More... | |
double | cx |
double | fa |
double | fb |
double | fc |
double | fmin |
const double | GLIMIT |
The maximum magnification allowed for a parabolic fit step. More... | |
const double | GOLD |
The default ration by which successive intervals are magnified. More... | |
const unsigned | ITMAX |
Maximum number of interactions in line minimiser. More... | |
bool | minimised |
Has the function been minimised. More... | |
FCLASS | myclass_func |
The class containing the function we are trying to minimise. More... | |
const double | TINY |
Use to prevent any possible division by zero. More... | |
double | tol |
The tolerance for the line minimiser. More... | |
const double | ZEPS |
A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero. 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::Minimise1DBrent< FCLASS >::bracket | ( | const double & | ax, |
const double & | xx, | ||
eng_pointer | eng | ||
) |
Bracket the minium.
double PLMD::Minimise1DBrent< FCLASS >::getMinimumValue |
Return the value of the function at the minimum.
double PLMD::Minimise1DBrent< FCLASS >::minimise | ( | 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 |
The value of the golden ratio.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The maximum magnification allowed for a parabolic fit step.
|
private |
The default ration by which successive intervals are magnified.
|
private |
Maximum number of interactions in line minimiser.
|
private |
Has the function been minimised.
|
private |
The class containing the function we are trying to minimise.
|
private |
Use to prevent any possible division by zero.
|
private |
The tolerance for the line minimiser.
|
private |
A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero.
Hosted by GitHub | 1.8.17 |