![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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 <<. | |
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 preparing A and B parameters only. It does not perform the job.
| 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::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_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 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 <<.
returns the bracketed triplet function values. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
| bool math_BracketMinimum::IsDone | ( | ) | const |
Returns true if the computations are successful, otherwise returns false.
| void math_BracketMinimum::Perform | ( | math_Function & | F | ) |
The method performing the job. It is called automatically by constructors with the function.
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.
Returns the bracketed triplet of abscissae. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).