Open CASCADE Technology
7.7.0
|
Function for search of sphere canonic parameters: coordinates of center and radius from set of moints by least square method. //! The class inherits math_MultipleVarFunctionWithGradient and thus is intended for use in math_BFGS algorithm. More...
#include <GeomConvert_FuncSphereLSDist.hxx>
Public Member Functions | |
GeomConvert_FuncSphereLSDist () | |
Constructor. More... | |
GeomConvert_FuncSphereLSDist (const Handle< TColgp_HArray1OfXYZ > &thePoints) | |
void | SetPoints (const Handle< TColgp_HArray1OfXYZ > &thePoints) |
Standard_Integer | NbVariables () const override |
Number of variables. More... | |
Standard_Boolean | Value (const math_Vector &X, Standard_Real &F) override |
Value. More... | |
Standard_Boolean | Gradient (const math_Vector &X, math_Vector &G) override |
Gradient. More... | |
Standard_Boolean | Values (const math_Vector &X, Standard_Real &F, math_Vector &G) override |
Value and gradient. More... | |
Public Member Functions inherited from math_MultipleVarFunction | |
virtual Standard_Integer | GetStateNumber () |
return the state of the function corresponding to the latestt call of any methods associated to the function. This function is called by each of the algorithms described later which define the function Integer Algorithm::StateNumber(). The algorithm has the responsibility to call this function when it has found a solution (i.e. a root or a minimum) and has to maintain the association between the solution found and this StateNumber. Byu default, this method returns 0 (which means for the algorithm: no state has been saved). It is the responsibility of the programmer to decide if he needs to save the current state of the function and to return an Integer that allows retrieval of the state. More... | |
virtual | ~math_MultipleVarFunction () |
Function for search of sphere canonic parameters: coordinates of center and radius from set of moints by least square method. //! The class inherits math_MultipleVarFunctionWithGradient and thus is intended for use in math_BFGS algorithm.
The criteria is: F(x0, y0, z0, R) = Sum[(x(i) - x0)^2 + (y(i) - y0)^2 + (z(i) - z0)^2 - R^2]^2 => min, x(i), y(i), z(i) - coordinates of sample points, x0, y0, z0, R - coordinates of center and radius of sphere, which must be defined
The first derivative are: dF/dx0 : G1(x0, y0, z0, R) = -4*Sum{[...]*(x(i) - x0)} dF/dy0 : G2(x0, y0, z0, R) = -4*Sum{[...]*(y(i) - y0)} dF/dz0 : G3(x0, y0, z0, R) = -4*Sum{[...]*(z(i) - z0)} dF/dR : G4(x0, y0, z0, R) = -4*R*Sum[...] [...] = [(x(i) - x0)^2 + (y(i) - y0)^2 + (z(i) - z0)^2 - R^2]
|
inline |
Constructor.
GeomConvert_FuncSphereLSDist::GeomConvert_FuncSphereLSDist | ( | const Handle< TColgp_HArray1OfXYZ > & | thePoints | ) |
|
overridevirtual |
Gradient.
Implements math_MultipleVarFunctionWithGradient.
|
overridevirtual |
Number of variables.
Implements math_MultipleVarFunctionWithGradient.
|
inline |
|
overridevirtual |
Value.
Implements math_MultipleVarFunctionWithGradient.
|
overridevirtual |
Value and gradient.
Implements math_MultipleVarFunctionWithGradient.