Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
math_BracketMinimum Class Reference

Given two distinct initial points, BracketMinimum implements the computation of three points (a, b, c) which bracket the minimum of the function and verify A less than B, B less than C and F(B) less than F(A), F(B) less than F(C). More...

#include <math_BracketMinimum.hxx>

Public Member Functions

 math_BracketMinimum (const double A, const double B)
 Constructor preparing A and B parameters only. It does not perform the job.
 
 math_BracketMinimum (math_Function &F, const double A, const double B)
 Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F.
 
 math_BracketMinimum (math_Function &F, const double A, const double B, const double FA)
 Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F. This constructor has to be used if F(A) is known.
 
 math_BracketMinimum (math_Function &F, const double A, const double B, const double FA, const double FB)
 Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F. This constructor has to be used if F(A) and F(B) are known.
 
void SetLimits (const double theLeft, const double theRight)
 Set limits of the parameter. By default no limits are applied to the parameter change. If no minimum is found in limits then IsDone() will return false. The user is in charge of providing A and B to be in limits.
 
void SetFA (const double theValue)
 Set function value at A.
 
void SetFB (const double theValue)
 Set function value at B.
 
void Perform (math_Function &F)
 The method performing the job. It is called automatically by constructors with the function.
 
bool IsDone () const
 Returns true if the computations are successful, otherwise returns false.
 
void Values (double &A, double &B, double &C) const
 Returns the bracketed triplet of abscissae. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
 
void FunctionValues (double &FA, double &FB, double &FC) const
 returns the bracketed triplet function values. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
 
void Dump (Standard_OStream &o) const
 Prints on the stream o information on the current state of the object. Is used to redefine the operator <<.
 

Detailed Description

Given two distinct initial points, BracketMinimum implements the computation of three points (a, b, c) which bracket the minimum of the function and verify A less than B, B less than C and F(B) less than F(A), F(B) less than F(C).

The algorithm supports conditional optimization. By default no limits are applied to the parameter change. The method SetLimits defines the allowed range. If no minimum is found in limits then IsDone() will return false. The user is in charge of providing A and B to be in limits.

Constructor & Destructor Documentation

◆ math_BracketMinimum() [1/4]

math_BracketMinimum::math_BracketMinimum ( const double A,
const double B )

Constructor preparing A and B parameters only. It does not perform the job.

◆ math_BracketMinimum() [2/4]

math_BracketMinimum::math_BracketMinimum ( math_Function & F,
const double A,
const double B )

Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F.

◆ math_BracketMinimum() [3/4]

math_BracketMinimum::math_BracketMinimum ( math_Function & F,
const double A,
const double B,
const double FA )

Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F. This constructor has to be used if F(A) is known.

◆ math_BracketMinimum() [4/4]

math_BracketMinimum::math_BracketMinimum ( math_Function & F,
const double A,
const double B,
const double FA,
const double FB )

Given two initial values this class computes a bracketing triplet of abscissae Ax, Bx, Cx (such that Bx is between Ax and Cx, F(Bx) is less than both F(Bx) and F(Cx)) the Brent minimization is done on the function F. This constructor has to be used if F(A) and F(B) are known.

Member Function Documentation

◆ Dump()

void math_BracketMinimum::Dump ( Standard_OStream & o) const

Prints on the stream o information on the current state of the object. Is used to redefine the operator <<.

◆ FunctionValues()

void math_BracketMinimum::FunctionValues ( double & FA,
double & FB,
double & FC ) const

returns the bracketed triplet function values. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).

◆ IsDone()

bool math_BracketMinimum::IsDone ( ) const

Returns true if the computations are successful, otherwise returns false.

◆ Perform()

void math_BracketMinimum::Perform ( math_Function & F)

The method performing the job. It is called automatically by constructors with the function.

◆ SetFA()

void math_BracketMinimum::SetFA ( const double theValue)

Set function value at A.

◆ SetFB()

void math_BracketMinimum::SetFB ( const double theValue)

Set function value at B.

◆ SetLimits()

void math_BracketMinimum::SetLimits ( const double theLeft,
const double theRight )

Set limits of the parameter. By default no limits are applied to the parameter change. If no minimum is found in limits then IsDone() will return false. The user is in charge of providing A and B to be in limits.

◆ Values()

void math_BracketMinimum::Values ( double & A,
double & B,
double & C ) const

Returns the bracketed triplet of abscissae. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).


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