Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:29

0001 // Created on: 2014-01-20
0002 // Created by: Alexaner Malyshev
0003 // Copyright (c) 2014-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement
0015 
0016 #ifndef _Extrema_GlobOptFuncCC_HeaderFile
0017 #define _Extrema_GlobOptFuncCC_HeaderFile
0018 
0019 #include <Adaptor2d_Curve2d.hxx>
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <math_Matrix.hxx>
0022 #include <math_Vector.hxx>
0023 #include <math_MultipleVarFunctionWithHessian.hxx>
0024 
0025 //! This class implements function which calculate Eucluidean distance
0026 //! between point on curve and point on other curve in case of C1 and C2 continuity is C0.
0027 class Extrema_GlobOptFuncCCC0 : public math_MultipleVarFunction
0028 {
0029 public:
0030 
0031   Standard_EXPORT  Extrema_GlobOptFuncCCC0(const Adaptor3d_Curve& C1,
0032                                            const Adaptor3d_Curve& C2);
0033 
0034   Standard_EXPORT  Extrema_GlobOptFuncCCC0(const Adaptor2d_Curve2d& C1,
0035                                            const Adaptor2d_Curve2d& C2);
0036 
0037   
0038 
0039   Standard_EXPORT virtual Standard_Integer NbVariables() const;
0040 
0041   Standard_EXPORT virtual Standard_Boolean Value(const math_Vector& X,Standard_Real& F);
0042 
0043 
0044 private:
0045 
0046   Extrema_GlobOptFuncCCC0 & operator = (const Extrema_GlobOptFuncCCC0 & theOther);
0047 
0048   const Adaptor3d_Curve *myC1_3d, *myC2_3d;
0049   const Adaptor2d_Curve2d *myC1_2d, *myC2_2d;
0050   Standard_Integer myType;
0051 };
0052 
0053 
0054 //! This class implements function which calculate Eucluidean distance
0055 //! between point on curve and point on other curve in case of C1 and C2 continuity is C1.
0056 class Extrema_GlobOptFuncCCC1 : public math_MultipleVarFunctionWithGradient
0057 {
0058 public:
0059 
0060   Standard_EXPORT  Extrema_GlobOptFuncCCC1(const Adaptor3d_Curve& C1,
0061                                            const Adaptor3d_Curve& C2);
0062 
0063   Standard_EXPORT  Extrema_GlobOptFuncCCC1(const Adaptor2d_Curve2d& C1,
0064                                            const Adaptor2d_Curve2d& C2);
0065 
0066   Standard_EXPORT virtual Standard_Integer NbVariables() const;
0067 
0068   Standard_EXPORT virtual Standard_Boolean Value(const math_Vector& X,Standard_Real& F);
0069 
0070   Standard_EXPORT virtual Standard_Boolean Gradient(const math_Vector& X,math_Vector& G);
0071 
0072   Standard_EXPORT virtual  Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G);
0073 
0074 
0075 private:
0076 
0077   Extrema_GlobOptFuncCCC1 & operator = (const Extrema_GlobOptFuncCCC1 & theOther);
0078 
0079   const Adaptor3d_Curve *myC1_3d, *myC2_3d;
0080   const Adaptor2d_Curve2d *myC1_2d, *myC2_2d;
0081   Standard_Integer myType;
0082 };
0083 
0084 
0085 //! This class implements function which calculate Eucluidean distance
0086 //! between point on curve and point on other curve in case of C1 and C2 continuity is C2.
0087 class Extrema_GlobOptFuncCCC2 : public math_MultipleVarFunctionWithHessian
0088 {
0089 public:
0090 
0091   Standard_EXPORT  Extrema_GlobOptFuncCCC2(const Adaptor3d_Curve& C1,
0092                                            const Adaptor3d_Curve& C2);
0093 
0094   Standard_EXPORT  Extrema_GlobOptFuncCCC2(const Adaptor2d_Curve2d& C1,
0095                                            const Adaptor2d_Curve2d& C2);
0096 
0097   Standard_EXPORT virtual Standard_Integer NbVariables() const;
0098 
0099   Standard_EXPORT virtual Standard_Boolean Value(const math_Vector& X,Standard_Real& F);
0100 
0101   Standard_EXPORT virtual Standard_Boolean Gradient(const math_Vector& X,math_Vector& G);
0102 
0103   Standard_EXPORT virtual Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G);
0104 
0105   Standard_EXPORT virtual Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G,math_Matrix& H);
0106 
0107 
0108 private:
0109 
0110   Extrema_GlobOptFuncCCC2 & operator = (const Extrema_GlobOptFuncCCC2 & theOther);
0111 
0112   const Adaptor3d_Curve *myC1_3d, *myC2_3d;
0113   const Adaptor2d_Curve2d *myC1_2d, *myC2_2d;
0114   Standard_Integer myType;
0115 };
0116 
0117 #endif