![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Polynomial definition for surface normal computation at singular points. More...
#include <CSLib_NormalPolyDef.hxx>

Public Member Functions | |
| CSLib_NormalPolyDef (int theK0, const NCollection_Array1< double > &theLi) | |
| Constructs a polynomial definition for normal computation. | |
| bool | Value (const double theX, double &theF) override |
| Computes the value of the function for the given variable. | |
| bool | Derivative (const double theX, double &theD) override |
| Computes the derivative of the function for the given variable. | |
| bool | Values (const double theX, double &theF, double &theD) override |
| Computes both the value and derivative of the function. | |
Public Member Functions inherited from math_FunctionWithDerivative | |
| ~math_FunctionWithDerivative () override | |
Public Member Functions inherited from math_Function | |
| virtual | ~math_Function ()=default |
| Virtual destructor, for safe inheritance. | |
| virtual int | GetStateNumber () |
| returns the state of the function corresponding to the latest call of any methods associated with the function. This function is called by each of the algorithms described later which defined 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. | |
Polynomial definition for surface normal computation at singular points.
This class defines a polynomial function F(X) and its derivative for use with numerical root-finding algorithms. The function represents a trigonometric polynomial in terms of cos(X) and sin(X) with binomial coefficients.
The polynomial has the form: F(X) = Sum_{i=0}^{k0} C(k0,i) * cos^i(X) * sin^(k0-i)(X) * li(i)
where C(k0,i) is the binomial coefficient and li(i) are user-provided coefficients.
This is used internally by CSLib::Normal() to find the normal direction at singular surface points by solving for zeros of this polynomial.
| CSLib_NormalPolyDef::CSLib_NormalPolyDef | ( | int | theK0, |
| const NCollection_Array1< double > & | theLi ) |
Constructs a polynomial definition for normal computation.
| [in] | theK0 | Polynomial degree (must be >= 0) |
| [in] | theLi | Array of coefficients with indices 0 to theK0 |
Computes the derivative of the function for the given variable.
Evaluates dF/dX using the chain rule on the trigonometric polynomial.
| [in] | theX | Input variable (angle in radians) |
| [out] | theD | Computed derivative value |
Implements math_FunctionWithDerivative.
Computes the value of the function for the given variable.
Evaluates F(X) = Sum_{i=0}^{k0} C(k0,i) * cos^i(X) * sin^(k0-i)(X) * li(i)
| [in] | theX | Input variable (angle in radians) |
| [out] | theF | Computed function value |
Implements math_FunctionWithDerivative.
|
overridevirtual |
Computes both the value and derivative of the function.
More efficient than calling Value() and Derivative() separately as common subexpressions are computed only once.
| [in] | theX | Input variable (angle in radians) |
| [out] | theF | Computed function value |
| [out] | theD | Computed derivative value |
Implements math_FunctionWithDerivative.