Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
math_FunctionAllRoots Class Reference

This algorithm uses a sample of the function to find all intervals on which the function is null, and afterwards uses the FunctionRoots algorithm to find the points where the function is null outside the "null intervals". Knowledge of the derivative is required. More...

#include <math_FunctionAllRoots.hxx>

Public Member Functions

 math_FunctionAllRoots (math_FunctionWithDerivative &F, const math_FunctionSample &S, const double EpsX, const double EpsF, const double EpsNul)
 The algorithm uses the sample to find intervals on which the function is null. An interval is found if, for at least two consecutive points of the sample, Ui and Ui+1, we get |F(Ui)|<=EpsNul and |F(Ui+1)|<=EpsNul. The real bounds of an interval are computed with the FunctionRoots. algorithm. Between two intervals, the roots of the function F are calculated using the FunctionRoots algorithm.
 
bool IsDone () const
 Returns True if the computation has been done successfully.
 
int NbIntervals () const
 Returns the number of intervals on which the function is Null. An exception is raised if IsDone returns False.
 
void GetInterval (const int Index, double &A, double &B) const
 Returns the interval of parameter of range Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.
 
void GetIntervalState (const int Index, int &IFirst, int &ILast) const
 returns the State Number associated to the interval Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.
 
int NbPoints () const
 returns the number of points where the function is Null. An exception is raised if IsDone returns False.
 
double GetPoint (const int Index) const
 Returns the parameter of the point of range Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >NbPoints.
 
int GetPointState (const int Index) const
 returns the State Number associated to the point Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.
 
void Dump (Standard_OStream &o) const
 Prints on the stream o information on the current state of the object.
 

Detailed Description

This algorithm uses a sample of the function to find all intervals on which the function is null, and afterwards uses the FunctionRoots algorithm to find the points where the function is null outside the "null intervals". Knowledge of the derivative is required.

Constructor & Destructor Documentation

◆ math_FunctionAllRoots()

math_FunctionAllRoots::math_FunctionAllRoots ( math_FunctionWithDerivative & F,
const math_FunctionSample & S,
const double EpsX,
const double EpsF,
const double EpsNul )

The algorithm uses the sample to find intervals on which the function is null. An interval is found if, for at least two consecutive points of the sample, Ui and Ui+1, we get |F(Ui)|<=EpsNul and |F(Ui+1)|<=EpsNul. The real bounds of an interval are computed with the FunctionRoots. algorithm. Between two intervals, the roots of the function F are calculated using the FunctionRoots algorithm.

Member Function Documentation

◆ Dump()

void math_FunctionAllRoots::Dump ( Standard_OStream & o) const

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

◆ GetInterval()

void math_FunctionAllRoots::GetInterval ( const int Index,
double & A,
double & B ) const

Returns the interval of parameter of range Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.

◆ GetIntervalState()

void math_FunctionAllRoots::GetIntervalState ( const int Index,
int & IFirst,
int & ILast ) const

returns the State Number associated to the interval Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.

◆ GetPoint()

double math_FunctionAllRoots::GetPoint ( const int Index) const

Returns the parameter of the point of range Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >NbPoints.

◆ GetPointState()

int math_FunctionAllRoots::GetPointState ( const int Index) const

returns the State Number associated to the point Index. An exception is raised if IsDone returns False; An exception is raised if Index<=0 or Index >Nbintervals.

◆ IsDone()

bool math_FunctionAllRoots::IsDone ( ) const

Returns True if the computation has been done successfully.

◆ NbIntervals()

int math_FunctionAllRoots::NbIntervals ( ) const

Returns the number of intervals on which the function is Null. An exception is raised if IsDone returns False.

◆ NbPoints()

int math_FunctionAllRoots::NbPoints ( ) const

returns the number of points where the function is Null. An exception is raised if IsDone returns False.


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