# FoundationClasses
TKMath
math

# 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

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | 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.
Standard_EXPORT void | Dump (Standard_OStream &o) const
| Prints on the stream o information on the current state of the object. .

## Private Attributes

Standard_Boolean | Done
Standard_Boolean | AllNull
TColStd_SequenceOfReal | Sol
TColStd_SequenceOfInteger | NbStateSol

## Constructor & Destructor Documentation

Standard_EXPORT math_FunctionRoots::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`
| ) |

## Member Function Documentation

Standard_EXPORT void math_FunctionRoots::Dump | ( | Standard_OStream & | o | ) | const

Standard_Boolean math_FunctionRoots::IsAllNull | ( |  | ) | const`[inline]`

Standard_Boolean math_FunctionRoots::IsDone | ( |  | ) | const`[inline]`

Standard_Integer math_FunctionRoots::NbSolutions | ( |  | ) | const`[inline]`

void math_FunctionRoots::operator delete | ( | void * | anAddress | ) | `[inline]`

void* math_FunctionRoots::operator new | ( | size_t | size | ) | `[inline]`

void* math_FunctionRoots::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_Integer math_FunctionRoots::StateNumber | ( | const Standard_Integer | Nieme | ) | const`[inline]`

Standard_Real math_FunctionRoots::Value | ( | const Standard_Integer | Nieme | ) | const`[inline]`

## Field Documentation

Standard_Boolean math_FunctionRoots::AllNull `[private]`

Standard_Boolean math_FunctionRoots::Done `[private]`

TColStd_SequenceOfInteger math_FunctionRoots::NbStateSol `[private]`

TColStd_SequenceOfReal math_FunctionRoots::Sol `[private]`

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

- math_FunctionRoots.hxx
- math_FunctionRoots.lxx