summaryrefslogtreecommitdiff
path: root/inc/Expr_FunctionDerivative.hxx
blob: be75f4d73dd5081d877ab8df7d45721792511093 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Expr_FunctionDerivative_HeaderFile
#define _Expr_FunctionDerivative_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Expr_FunctionDerivative_HeaderFile
#include <Handle_Expr_FunctionDerivative.hxx>
#endif

#ifndef _Handle_Expr_GeneralFunction_HeaderFile
#include <Handle_Expr_GeneralFunction.hxx>
#endif
#ifndef _Handle_Expr_GeneralExpression_HeaderFile
#include <Handle_Expr_GeneralExpression.hxx>
#endif
#ifndef _Handle_Expr_NamedUnknown_HeaderFile
#include <Handle_Expr_NamedUnknown.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Expr_GeneralFunction_HeaderFile
#include <Expr_GeneralFunction.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class Expr_GeneralFunction;
class Expr_GeneralExpression;
class Expr_NamedUnknown;
class Standard_OutOfRange;
class Standard_DimensionMismatch;
class Standard_NumericError;
class Expr_NotEvaluable;
class Expr_NamedFunction;
class Expr_Array1OfNamedUnknown;
class TColStd_Array1OfReal;
class TCollection_AsciiString;



class Expr_FunctionDerivative : public Expr_GeneralFunction {

public:

  //! Creates a FunctionDerivative of degree <deg> relative <br>
//!          to the <withX> variable. <br>
//!          Raises OutOfRange if <deg> lower or equal to zero. <br>
  Standard_EXPORT   Expr_FunctionDerivative(const Handle(Expr_GeneralFunction)& func,const Handle(Expr_NamedUnknown)& withX,const Standard_Integer deg);
  //! Returns the number of variables of <me>. <br>
  Standard_EXPORT     Standard_Integer NbOfVariables() const;
  //! Returns the variable denoted by <index> in <me>. <br>
//!          Raises OutOfRange if <index> greater than <br>
//!          NbOfVariables of <me>. <br>
  Standard_EXPORT     Handle_Expr_NamedUnknown Variable(const Standard_Integer index) const;
  //! Computes the value of <me> with the given variables. <br>
//!          Raises DimensionMismatch if Length(vars) is different from <br>
//!          Length(values). <br>
  Standard_EXPORT     Standard_Real Evaluate(const Expr_Array1OfNamedUnknown& vars,const TColStd_Array1OfReal& values) const;
  //! Returns a copy of <me> with the same form. <br>
  Standard_EXPORT     Handle_Expr_GeneralFunction Copy() const;
  //! Returns Derivative of <me> for variable <var>. <br>
  Standard_EXPORT     Handle_Expr_GeneralFunction Derivative(const Handle(Expr_NamedUnknown)& var) const;
  //! Returns Derivative of <me> for variable <var> with <br>
//!          degree <deg>. <br>
  Standard_EXPORT     Handle_Expr_GeneralFunction Derivative(const Handle(Expr_NamedUnknown)& var,const Standard_Integer deg) const;
  //! Tests if <me> and <func> are similar functions (same <br>
//!          name and same used expression). <br>
  Standard_EXPORT     Standard_Boolean IsIdentical(const Handle(Expr_GeneralFunction)& func) const;
  //! Tests if <me> is linear on variable on range <index> <br>
  Standard_EXPORT     Standard_Boolean IsLinearOnVariable(const Standard_Integer index) const;
  //! Returns the function of which <me> is the derivative. <br>
  Standard_EXPORT     Handle_Expr_GeneralFunction Function() const;
  //! Returns the degree of derivation of <me>. <br>
  Standard_EXPORT     Standard_Integer Degree() const;
  //! Returns the derivation variable of <me>. <br>
  Standard_EXPORT     Handle_Expr_NamedUnknown DerivVariable() const;
  
  Standard_EXPORT     TCollection_AsciiString GetStringName() const;
  
  Standard_EXPORT     Handle_Expr_GeneralExpression Expression() const;
  
  Standard_EXPORT     void UpdateExpression() ;


friend class Expr_NamedFunction;


  DEFINE_STANDARD_RTTI(Expr_FunctionDerivative)

protected:




private: 


Handle_Expr_GeneralFunction myFunction;
Handle_Expr_GeneralExpression myExp;
Handle_Expr_NamedUnknown myDerivate;
Standard_Integer myDegree;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif