mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0025720: Incorrect code of math classes can lead to unpredicted behavior of algorithms
The calling of virtual methods has been removed from constructors & destructors: math_BissecNewton math_BrentMinimum math_FRPR math_FunctionSetRoot math_NewtonFunctionSetRoot math_NewtonMinimum math_Powell
This commit is contained in:
@@ -15,8 +15,26 @@
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <Standard_DimensionError.hxx>
|
||||
|
||||
inline void math_FunctionSetRoot::Delete() const
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Boolean math_FunctionSetRoot::IsSolutionReached(math_FunctionSetWithDerivatives&)
|
||||
{
|
||||
for (Standard_Integer i = 1; i <= Sol.Length(); ++i)
|
||||
if ( Abs(Delta(i)) > Tol(i) )
|
||||
return Standard_False;
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Boolean math_FunctionSetRoot::IsDone() const
|
||||
{
|
||||
return Done;
|
||||
}
|
||||
|
||||
inline Standard_Boolean math_FunctionSetRoot::IsDone() const { return Done; }
|
||||
|
||||
inline Standard_OStream& operator<<(Standard_OStream& o,
|
||||
const math_FunctionSetRoot& F)
|
||||
|
Reference in New Issue
Block a user