Public Member Functions | Private Types | Private Attributes | List of all members
PLMD::Brent1DRootSearch< FCLASS > Class Template Reference

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

bool bracketed
 Has the minimum been bracketed. More...
 
double tol
 The tolerance for the line minimiser. More...
 
const unsigned ITMAX
 Maximum number of interactions in line minimiser. More...
 
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 ax
 Three points bracketting the minimum and the corresponding function values. More...
 
double bx
 
double fa
 
double fb
 
FCLASS myclass_func
 The class containing the function we are trying to minimise. More...
 

Detailed Description

template<class FCLASS>
class PLMD::Brent1DRootSearch< FCLASS >

A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method.

Member Typedef Documentation

◆ eng_pointer

template<class FCLASS >
typedef double(FCLASS::* PLMD::Brent1DRootSearch< FCLASS >::eng_pointer) (const double &val)
private

This is the type specifier for the function to minimise.

Constructor & Destructor Documentation

◆ Brent1DRootSearch()

template<class FCLASS >
PLMD::Brent1DRootSearch< FCLASS >::Brent1DRootSearch ( const FCLASS &  pf,
const double &  t = 3.0E-8 
)
explicit

Member Function Documentation

◆ bracket()

template<class FCLASS >
void PLMD::Brent1DRootSearch< FCLASS >::bracket ( const double &  ax,
const double &  xx,
eng_pointer  eng 
)

Bracket the minium.

◆ search()

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::search ( eng_pointer  eng)

Find the minimum between two brackets.

Member Data Documentation

◆ ax

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::ax
private

Three points bracketting the minimum and the corresponding function values.

◆ bracketed

template<class FCLASS >
bool PLMD::Brent1DRootSearch< FCLASS >::bracketed
private

Has the minimum been bracketed.

◆ bx

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::bx
private

◆ EPS

template<class FCLASS >
const double PLMD::Brent1DRootSearch< FCLASS >::EPS
private

A small number that protects against trying to achieve fractional accuracy for a minimum that happens to be exactly zero.

◆ EXPAND

template<class FCLASS >
const double PLMD::Brent1DRootSearch< FCLASS >::EXPAND
private

The factor by which to expand the range when bracketing.

◆ fa

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::fa
private

◆ fb

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::fb
private

◆ ITMAX

template<class FCLASS >
const unsigned PLMD::Brent1DRootSearch< FCLASS >::ITMAX
private

Maximum number of interactions in line minimiser.

◆ myclass_func

template<class FCLASS >
FCLASS PLMD::Brent1DRootSearch< FCLASS >::myclass_func
private

The class containing the function we are trying to minimise.

◆ tol

template<class FCLASS >
double PLMD::Brent1DRootSearch< FCLASS >::tol
private

The tolerance for the line minimiser.


The documentation for this class was generated from the following file: