Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
math_FunctionRoots Class Reference

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.

#include <math_FunctionRoots.hxx>

Public Member Functions

DEFINE_STANDARD_ALLOC math_FunctionRoots (math_FunctionWithDerivative &F, const Standard_Real A, const Standard_Real B, const Standard_Integer NbSample, const Standard_Real EpsX=0.0, const Standard_Real EpsF=0.0, const Standard_Real EpsNull=0.0, const Standard_Real K=0.0)
 Calculates all the real roots of a function F-K within the range
A..B. whithout 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.

Standard_Boolean IsDone () const
 Returns true if the computations are successful, otherwise returns false.

Standard_Boolean 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).

Standard_Integer NbSolutions () const
 Returns the number of solutions found.
Exceptions
StdFail_NotDone if the algorithm fails (and IsDone returns false).

Standard_Real Value (const Standard_Integer Nieme) const
 Returns the Nth value of the root of function F.
Exceptions
StdFail_NotDone if the algorithm fails (and IsDone returns false).

Standard_Integer StateNumber (const Standard_Integer 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.


Constructor & Destructor Documentation


Member Function Documentation


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