File indexing completed on 2026-09-20 09:17:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Extrema_GlobOptFuncCS_HeaderFile
0017 #define _Extrema_GlobOptFuncCS_HeaderFile
0018
0019 #include <Adaptor3d_Surface.hxx>
0020 #include <math_Matrix.hxx>
0021 #include <math_Vector.hxx>
0022 #include <math_MultipleVarFunctionWithHessian.hxx>
0023
0024
0025
0026 class Extrema_GlobOptFuncCS : public math_MultipleVarFunctionWithHessian
0027 {
0028 public:
0029
0030 Standard_EXPORT Extrema_GlobOptFuncCS(const Adaptor3d_Curve* C, const Adaptor3d_Surface* S);
0031
0032 Standard_EXPORT int NbVariables() const override;
0033
0034 Standard_EXPORT bool Value(const math_Vector& theX, double& theF) override;
0035
0036 Standard_EXPORT bool Gradient(const math_Vector& theX, math_Vector& theG) override;
0037
0038 Standard_EXPORT bool Values(const math_Vector& theX, double& theF, math_Vector& theG) override;
0039
0040 Standard_EXPORT bool Values(const math_Vector& theX,
0041 double& theF,
0042 math_Vector& theG,
0043 math_Matrix& theH) override;
0044
0045 private:
0046 bool checkInputData(const math_Vector& X, double& cu, double& su, double& sv);
0047
0048 void value(double cu, double su, double sv, double& F);
0049
0050 void gradient(double cu, double su, double sv, math_Vector& G);
0051
0052 void hessian(double cu, double su, double sv, math_Matrix& H);
0053
0054 Extrema_GlobOptFuncCS& operator=(const Extrema_GlobOptFuncCS& theOther) = delete;
0055
0056 const Adaptor3d_Curve* myC;
0057 const Adaptor3d_Surface* myS;
0058 };
0059
0060 #endif