OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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. 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.

    Detailed Description

    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.

    Constructor & Destructor Documentation

    ◆ math_FunctionRoots()

    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.

    Member Function Documentation

    ◆ Dump()

    void math_FunctionRoots::Dump ( Standard_OStream & o) const

    Prints on the stream o information on the current state of the object.

    ◆ IsAllNull()

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

    ◆ IsDone()

    bool math_FunctionRoots::IsDone ( ) const

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

    ◆ NbSolutions()

    int math_FunctionRoots::NbSolutions ( ) const

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

    ◆ StateNumber()

    int math_FunctionRoots::StateNumber ( const int Nieme) const

    returns the StateNumber of the Nieme root. Exception RangeError is raised if Nieme is < 1 or Nieme > NbSolutions.

    ◆ Value()

    double math_FunctionRoots::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).


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