![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This class implements an algorithm which finds all the real roots of a function with derivative within a given range. Knowledge of the derivative is required. More...
#include <math_FunctionRoots.hxx>
Public Member Functions | |
| math_FunctionRoots (math_FunctionWithDerivative &F, const double A, const double B, const int NbSample, const double EpsX=0.0, const double EpsF=0.0, const double EpsNull=0.0, const double K=0.0) | |
| Calculates all the real roots of a function F-K within the range A..B. without conditions on A and B A solution X is found when abs(Xi - Xi-1) <= Epsx and abs(F(Xi)-K) <= EpsF. The function is considered as null between A and B if abs(F-K) <= EpsNull within this range. | |
| bool | IsDone () const |
| Returns true if the computations are successful, otherwise returns false. | |
| bool | IsAllNull () const |
| returns true if the function is considered as null between A and B. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false). | |
| int | NbSolutions () const |
| Returns the number of solutions found. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false). | |
| double | Value (const int Nieme) const |
| Returns the Nth value of the root of function F. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false). | |
| int | StateNumber (const int Nieme) const |
| returns the StateNumber of the Nieme root. Exception RangeError is raised if Nieme is < 1 or Nieme > NbSolutions. | |
| void | Dump (Standard_OStream &o) const |
| Prints on the stream o information on the current state of the object. | |
This class implements an algorithm which finds all the real roots of a function with derivative within a given range. Knowledge of the derivative is required.
| math_FunctionRoots::math_FunctionRoots | ( | math_FunctionWithDerivative & | F, |
| const double | A, | ||
| const double | B, | ||
| const int | NbSample, | ||
| const double | EpsX = 0.0, | ||
| const double | EpsF = 0.0, | ||
| const double | EpsNull = 0.0, | ||
| const double | K = 0.0 ) |
Calculates all the real roots of a function F-K within the range A..B. without conditions on A and B A solution X is found when abs(Xi - Xi-1) <= Epsx and abs(F(Xi)-K) <= EpsF. The function is considered as null between A and B if abs(F-K) <= EpsNull within this range.
| void math_FunctionRoots::Dump | ( | Standard_OStream & | o | ) | const |
Prints on the stream o information on the current state of the object.
| bool math_FunctionRoots::IsAllNull | ( | ) | const |
returns true if the function is considered as null between A and B. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
| bool math_FunctionRoots::IsDone | ( | ) | const |
Returns true if the computations are successful, otherwise returns false.
| int math_FunctionRoots::NbSolutions | ( | ) | const |
Returns the number of solutions found. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
returns the StateNumber of the Nieme root. Exception RangeError is raised if Nieme is < 1 or Nieme > NbSolutions.
Returns the Nth value of the root of function F. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).