#include <math_NewtonFunctionSetRoot.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_NewtonFunctionSetRoot (math_FunctionSetWithDerivatives &F, const math_Vector &XTol, const Standard_Real FTol, const Standard_Integer NbIterations=100) |
This constructor should be used in a sub-class to initialize correctly all the fields of this class. The range (1, F.NbVariables()) must be especially respected for all vectors and matrix declarations. . | |
Standard_EXPORT | math_NewtonFunctionSetRoot (math_FunctionSetWithDerivatives &F, const Standard_Real FTol, const Standard_Integer NbIterations=100) |
This constructor should be used in a sub-class to initialize correctly all the fields of this class. The range (1, F.NbVariables()) must be especially respected for all vectors and matrix declarations. The method SetTolerance must be called before performing the algorithm. . | |
Standard_EXPORT | math_NewtonFunctionSetRoot (math_FunctionSetWithDerivatives &F, const math_Vector &StartingPoint, const math_Vector &XTol, const Standard_Real FTol, const Standard_Integer NbIterations=100) |
The Newton method is done to improve the root of the function F from the initial guess StartingPoint. The tolerance required on the root is given by Tolerance. The solution is found when : abs(Xj - Xj-1)(i) <= XTol(i) and abs(Fi) <= FTol for all i; The maximum number of iterations allowed is given by NbIterations. . | |
Standard_EXPORT | math_NewtonFunctionSetRoot (math_FunctionSetWithDerivatives &F, const math_Vector &StartingPoint, const math_Vector &InfBound, const math_Vector &SupBound, const math_Vector &XTol, const Standard_Real FTol, const Standard_Integer NbIterations=100) |
The Newton method is done to improve the root of the function F from the initial guess StartingPoint. The tolerance required on the root is given by Tolerance. The solution is found when : abs(Xj - Xj-1)(i) <= XTol(i) and abs(Fi) <= FTol for all i; The maximum number of iterations allowed is given by NbIterations. . | |
virtual Standard_EXPORT void | Delete () |
virtual Standard_EXPORT | ~math_NewtonFunctionSetRoot () |
Standard_EXPORT void | SetTolerance (const math_Vector &XTol) |
Initializes the tolerance values for the unknowns. . | |
Standard_EXPORT void | Perform (math_FunctionSetWithDerivatives &F, const math_Vector &StartingPoint, const math_Vector &InfBound, const math_Vector &SupBound) |
Improves the root of function F from the initial guess StartingPoint. infBound and supBound may be given, to constrain the solution. Warning This method must be called when the solution is not computed by the constructors. . | |
virtual Standard_EXPORT Standard_Boolean | IsSolutionReached (math_FunctionSetWithDerivatives &F) |
This method is called at the end of each iteration to check if the solution is found. Vectors DeltaX, Fvalues and Jacobian Matrix are consistent with the possible solution Vector Sol and can be inspected to decide whether the solution is reached or not. . | |
Standard_Boolean | IsDone () const |
Returns true if the computations are successful, otherwise returns false. . | |
const math_Vector & | Root () const |
Returns the value of the root of function F. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false). . | |
void | Root (math_Vector &Root) const |
outputs the root vector in Root. Exception NotDone is raised if the root was not found. Exception DimensionError is raised if the range of Root is not equal to the range of the StartingPoint. | |
Standard_Integer | StateNumber () const |
Outputs the state number associated with the solution vector root. . | |
const math_Matrix & | Derivative () const |
Returns the matrix value of the derivative at the root. Exception NotDone is raised if the root was not found. . | |
void | Derivative (math_Matrix &Der) const |
Outputs the matrix value of the derivative at the root in Der. Exception NotDone is raised if the root was not found. Exception DimensionError is raised if the range of Der is not equal to the range of the StartingPoint. . | |
const math_Vector & | FunctionSetErrors () const |
Returns the vector value of the error done on the functions at the root. Exception NotDone is raised if the root was not found. . | |
void | FunctionSetErrors (math_Vector &Err) const |
Outputs the vector value of the error done on the functions at the root in Err. Exception NotDone is raised if the root was not found. Exception DimensionError is raised if the range of Err is not equal to the range of the StartingPoint. . | |
Standard_Integer | NbIterations () const |
Returns the number of iterations really done during the computation of the Root. Exception NotDone is raised if the root was not found. . | |
Standard_EXPORT void | Dump (Standard_OStream &o) const |
Prints information on the current state of the object. Is used to redefine the operator <<. . | |
Protected Attributes | |
math_Vector | TolX |
Standard_Real | TolF |
math_IntegerVector | Indx |
math_Vector | Scratch |
math_Vector | Sol |
math_Vector | DeltaX |
math_Vector | FValues |
math_Matrix | Jacobian |
Private Attributes | |
Standard_Boolean | Done |
Standard_Integer | State |
Standard_Integer | Iter |
Standard_Integer | Itermax |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|