1 -- Created on: 1991-01-14
2 -- Created by: Arnaud BOUZY
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class FunctionDerivative from Expr
19 inherits GeneralFunction from Expr
21 uses NamedUnknown from Expr,
22 GeneralExpression from Expr,
23 Array1OfNamedUnknown from Expr,
24 Array1OfReal from TColStd,
25 AsciiString from TCollection
27 raises OutOfRange from Standard,
28 DimensionMismatch from Standard,
29 NumericError from Standard,
30 NotEvaluable from Expr
34 Create(func : GeneralFunction; withX : NamedUnknown; deg : Integer)
35 ---Purpose: Creates a FunctionDerivative of degree <deg> relative
36 -- to the <withX> variable.
37 -- Raises OutOfRange if <deg> lower or equal to zero.
39 returns FunctionDerivative
43 ---Purpose: Returns the number of variables of <me>.
46 Variable(me; index : Integer)
47 ---Purpose: Returns the variable denoted by <index> in <me>.
48 -- Raises OutOfRange if <index> greater than
49 -- NbOfVariables of <me>.
53 Evaluate(me; vars : Array1OfNamedUnknown;
54 values : Array1OfReal)
55 ---Purpose: Computes the value of <me> with the given variables.
56 -- Raises DimensionMismatch if Length(vars) is different from
59 raises DimensionMismatch, NumericError,NotEvaluable;
62 ---Purpose: Returns a copy of <me> with the same form.
65 Derivative(me; var : NamedUnknown)
66 ---Purpose: Returns Derivative of <me> for variable <var>.
67 returns GeneralFunction;
69 Derivative(me; var : NamedUnknown; deg : Integer)
70 ---Purpose: Returns Derivative of <me> for variable <var> with
72 returns GeneralFunction;
74 IsIdentical(me; func : GeneralFunction)
75 ---Purpose: Tests if <me> and <func> are similar functions (same
76 -- name and same used expression).
79 IsLinearOnVariable(me; index : Integer)
80 ---Purpose: Tests if <me> is linear on variable on range <index>
84 ---Purpose: Returns the function of which <me> is the derivative.
86 returns GeneralFunction
90 ---Purpose: Returns the degree of derivation of <me>.
96 ---Purpose: Returns the derivation variable of <me>.
105 returns GeneralExpression
109 UpdateExpression(me: mutable);
114 myFunction : GeneralFunction;
115 myExp : GeneralExpression;
116 myDerivate : NamedUnknown;
121 class NamedFunction from Expr
123 end FunctionDerivative;