![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This class implements the computation of a root of a function of a single variable which is near an initial guess using a minimization algorithm.Knowledge of the derivative is required. The algorithm used is the same as in. More...
#include <math_FunctionRoot.hxx>
Public Member Functions | |
| math_FunctionRoot (math_FunctionWithDerivative &F, const double Guess, const double Tolerance, const int NbIterations=100) | |
| The Newton-Raphson method is done to find the root of the function F from the initial guess Guess.The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B. The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations. | |
| math_FunctionRoot (math_FunctionWithDerivative &F, const double Guess, const double Tolerance, const double A, const double B, const int NbIterations=100) | |
| The Newton-Raphson method is done to find the root of the function F from the initial guess Guess. The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations. | |
| bool | IsDone () const |
| Returns true if the computations are successful, otherwise returns false. | |
| double | Root () const |
| returns the value of the root. Exception NotDone is raised if the root was not found. | |
| double | Derivative () const |
| returns the value of the derivative at the root. Exception NotDone is raised if the root was not found. | |
| double | Value () const |
| returns the value of the function at the root. Exception NotDone is raised if the root was not found. | |
| int | NbIterations () const |
| returns the number of iterations really done on the computation of the Root. Exception NotDone is raised if the root was not found. | |
| 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 <<. | |
This class implements the computation of a root of a function of a single variable which is near an initial guess using a minimization algorithm.Knowledge of the derivative is required. The algorithm used is the same as in.
| math_FunctionRoot::math_FunctionRoot | ( | math_FunctionWithDerivative & | F, |
| const double | Guess, | ||
| const double | Tolerance, | ||
| const int | NbIterations = 100 ) |
The Newton-Raphson method is done to find the root of the function F from the initial guess Guess.The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B. The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations.
| math_FunctionRoot::math_FunctionRoot | ( | math_FunctionWithDerivative & | F, |
| const double | Guess, | ||
| const double | Tolerance, | ||
| const double | A, | ||
| const double | B, | ||
| const int | NbIterations = 100 ) |
The Newton-Raphson method is done to find the root of the function F from the initial guess Guess. The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations.
| double math_FunctionRoot::Derivative | ( | ) | const |
returns the value of the derivative at the root. Exception NotDone is raised if the root was not found.
| void math_FunctionRoot::Dump | ( | Standard_OStream & | o | ) | const |
Prints on the stream o information on the current state of the object. Is used to redefine the operator <<.
| bool math_FunctionRoot::IsDone | ( | ) | const |
Returns true if the computations are successful, otherwise returns false.
| int math_FunctionRoot::NbIterations | ( | ) | const |
returns the number of iterations really done on the computation of the Root. Exception NotDone is raised if the root was not found.
| double math_FunctionRoot::Root | ( | ) | const |
returns the value of the root. Exception NotDone is raised if the root was not found.
| double math_FunctionRoot::Value | ( | ) | const |
returns the value of the function at the root. Exception NotDone is raised if the root was not found.