0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / FEmTool / FEmTool_ElementaryCriterion.hxx
1 // Created on: 1997-09-11
2 // Created by: Philippe MANGIN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _FEmTool_ElementaryCriterion_HeaderFile
18 #define _FEmTool_ElementaryCriterion_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TColStd_HArray2OfReal.hxx>
24 #include <Standard_Real.hxx>
25 #include <MMgt_TShared.hxx>
26 #include <TColStd_HArray2OfInteger.hxx>
27 #include <Standard_Integer.hxx>
28 #include <math_Vector.hxx>
29 class Standard_NotImplemented;
30 class Standard_DomainError;
31 class math_Matrix;
32
33
34 class FEmTool_ElementaryCriterion;
35 DEFINE_STANDARD_HANDLE(FEmTool_ElementaryCriterion, MMgt_TShared)
36
37 //! defined J Criteria to used in minimisation
38 class FEmTool_ElementaryCriterion : public MMgt_TShared
39 {
40
41 public:
42
43   
44   //! Set the coefficient of the Element (the  Curve)
45   Standard_EXPORT void Set (const Handle(TColStd_HArray2OfReal)& Coeff);
46   
47   //! Set the definition interval of the Element
48   Standard_EXPORT virtual void Set (const Standard_Real FirstKnot, const Standard_Real LastKnot);
49   
50   //! To know if two dimension are independent.
51   Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const = 0;
52   
53   //! To Compute J(E) where E  is the current Element
54   Standard_EXPORT virtual Standard_Real Value() = 0;
55   
56   //! To Compute J(E)  the coefficients of Hessian matrix of
57   //! J(E) wich are crossed derivatives in dimensions <Dim1>
58   //! and  <Dim2>.
59   //! If DependenceTable(Dimension1,Dimension2) is False
60   Standard_EXPORT virtual void Hessian (const Standard_Integer Dim1, const Standard_Integer Dim2, math_Matrix& H) = 0;
61   
62   //! To Compute the  coefficients in the dimension <dim>
63   //! of  the  J(E)'s  Gradient where E  is  the current  Element
64   Standard_EXPORT virtual void Gradient (const Standard_Integer Dim, math_Vector& G) = 0;
65
66
67
68
69   DEFINE_STANDARD_RTTIEXT(FEmTool_ElementaryCriterion,MMgt_TShared)
70
71 protected:
72
73
74   Handle(TColStd_HArray2OfReal) myCoeff;
75   Standard_Real myFirst;
76   Standard_Real myLast;
77
78
79 private:
80
81
82
83
84 };
85
86
87
88
89
90
91
92 #endif // _FEmTool_ElementaryCriterion_HeaderFile