1 // Created on: 2014-06-23
2 // Created by: Alexander Malyshev
3 // Copyright (c) 2014-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement
16 #ifndef _Extrema_GlobOptFuncCS_HeaderFile
17 #define _Extrema_GlobOptFuncCS_HeaderFile
20 #include <Adaptor3d_Curve.hxx>
21 #include <Adaptor3d_Surface.hxx>
22 #include <math_Matrix.hxx>
23 #include <math_Vector.hxx>
24 #include <math_MultipleVarFunctionWithHessian.hxx>
26 //! This class implements function which calculate square Eucluidean distance
27 //! between point on curve and point on surface in case of continuity is C2.
28 class Extrema_GlobOptFuncCS : public math_MultipleVarFunctionWithHessian
32 //! Curve and surface should exist during all the lifetime of Extrema_GlobOptFuncCS.
33 Standard_EXPORT Extrema_GlobOptFuncCS(const Adaptor3d_Curve *C,
34 const Adaptor3d_Surface *S);
36 Standard_EXPORT virtual Standard_Integer NbVariables() const;
38 Standard_EXPORT virtual Standard_Boolean Value(const math_Vector &theX,
41 Standard_EXPORT virtual Standard_Boolean Gradient(const math_Vector &theX,
44 Standard_EXPORT virtual Standard_Boolean Values(const math_Vector &theX,
48 Standard_EXPORT virtual Standard_Boolean Values(const math_Vector &theX,
55 Standard_Boolean checkInputData(const math_Vector &X,
60 void value(Standard_Real cu,
65 void gradient(Standard_Real cu,
70 void hessian(Standard_Real cu,
75 Extrema_GlobOptFuncCS & operator = (const Extrema_GlobOptFuncCS & theOther);
77 const Adaptor3d_Curve *myC;
78 const Adaptor3d_Surface *myS;