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 | minimise (eng_pointer eng) |
Find the minimum between two brackets. More... | |
double | getMinimumValue () const |
Return the value of the function at the minimum. More... | |
Private Types | |
typedef double(FCLASS::* | eng_pointer) (const double &val) |
This is the type specifier for the function to minimise. More... | |
Private Attributes | |
bool | bracketed |
Has the minimum been bracketed. More... | |
bool | minimised |
Has the function been minimised. More... | |
double | tol |
The tolerance for the line minimiser. More... | |
const double | GOLD |
The default ration by which successive intervals are magnified. More... | |
const double | GLIMIT |
The maximum magnification allowed for a parabolic fit step. More... | |
const double | TINY |
Use to prevent any possible division by zero. More... | |
const unsigned | ITMAX |
Maximum number of interactions in line minimiser. More... | |
const double | CGOLD |
The value of the golden ratio. 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... | |
double | ax |
Three points bracketting the minimum and the corresponding function values. More... | |
double | bx |
double | cx |
double | fa |
double | fb |
double | fc |
double | fmin |
FCLASS | myclass_func |
The class containing the function we are trying to minimise. 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 | ( | ) | const |
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.14 |