Open CASCADE Technology  6.9.0
Public Member Functions

math_FunctionRoot Class Reference

This class implements the computation of a root of a function of a single variable which is near an initial guess using a minimization algorithm.Knowledge of the derivative is required. The algorithm used is the same as in. More...

#include <math_FunctionRoot.hxx>

Public Member Functions

 math_FunctionRoot (math_FunctionWithDerivative &F, const Standard_Real Guess, const Standard_Real Tolerance, const Standard_Integer NbIterations=100)
 The Newton-Raphson method is done to find the root of the function F from the initial guess Guess.The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B. The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations. More...
 
 math_FunctionRoot (math_FunctionWithDerivative &F, const Standard_Real Guess, const Standard_Real Tolerance, const Standard_Real A, const Standard_Real B, const Standard_Integer NbIterations=100)
 The Newton-Raphson method is done to find the root of the function F from the initial guess Guess. The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations. More...
 
Standard_Boolean IsDone () const
 Returns true if the computations are successful, otherwise returns false. More...
 
Standard_Real Root () const
 returns the value of the root. Exception NotDone is raised if the root was not found. More...
 
Standard_Real Derivative () const
 returns the value of the derivative at the root. Exception NotDone is raised if the root was not found. More...
 
Standard_Real Value () const
 returns the value of the function at the root. Exception NotDone is raised if the root was not found. More...
 
Standard_Integer NbIterations () const
 returns the number of iterations really done on the computation of the Root. Exception NotDone is raised if the root was not found. More...
 
void Dump (Standard_OStream &o) const
 Prints on the stream o information on the current state of the object. Is used to redefine the operator <<. More...
 

Detailed Description

This class implements the computation of a root of a function of a single variable which is near an initial guess using a minimization algorithm.Knowledge of the derivative is required. The algorithm used is the same as in.

Constructor & Destructor Documentation

math_FunctionRoot::math_FunctionRoot ( math_FunctionWithDerivative F,
const Standard_Real  Guess,
const Standard_Real  Tolerance,
const Standard_Integer  NbIterations = 100 
)

The Newton-Raphson method is done to find the root of the function F from the initial guess Guess.The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B. The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations.

math_FunctionRoot::math_FunctionRoot ( math_FunctionWithDerivative F,
const Standard_Real  Guess,
const Standard_Real  Tolerance,
const Standard_Real  A,
const Standard_Real  B,
const Standard_Integer  NbIterations = 100 
)

The Newton-Raphson method is done to find the root of the function F from the initial guess Guess. The tolerance required on the root is given by Tolerance. Iterations are stopped if the expected solution does not stay in the range A..B The solution is found when abs(Xi - Xi-1) <= Tolerance; The maximum number of iterations allowed is given by NbIterations.

Member Function Documentation

Standard_Real math_FunctionRoot::Derivative ( ) const

returns the value of the derivative at the root. Exception NotDone is raised if the root was not found.

void math_FunctionRoot::Dump ( Standard_OStream o) const

Prints on the stream o information on the current state of the object. Is used to redefine the operator <<.

Standard_Boolean math_FunctionRoot::IsDone ( ) const

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

Standard_Integer math_FunctionRoot::NbIterations ( ) const

returns the number of iterations really done on the computation of the Root. Exception NotDone is raised if the root was not found.

Standard_Real math_FunctionRoot::Root ( ) const

returns the value of the root. Exception NotDone is raised if the root was not found.

Standard_Real math_FunctionRoot::Value ( ) const

returns the value of the function at the root. Exception NotDone is raised if the root was not found.


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