7fd59977 |
1 | -- File: Difference.cdl |
2 | -- Created: Mon Jan 14 16:20:15 1991 |
3 | -- Author: Arnaud BOUZY |
4 | -- <adn@topsn3> |
5 | ---Copyright: Matra Datavision 1991 |
6 | |
7 | class Difference from Expr |
8 | |
9 | inherits BinaryExpression from Expr |
10 | |
11 | uses GeneralExpression from Expr, |
12 | AsciiString from TCollection, |
13 | Array1OfNamedUnknown from Expr, |
14 | Array1OfReal from TColStd, |
15 | NamedUnknown from Expr |
16 | |
17 | raises OutOfRange from Standard, |
18 | NumericError from Standard, |
19 | NotEvaluable from Expr |
20 | |
21 | is |
22 | |
23 | Create(exp1,exp2 : GeneralExpression) |
24 | ---Purpose: Creates the difference <exp1> - <exp2>. |
25 | returns mutable Difference; |
26 | |
27 | ShallowSimplified(me) |
28 | ---Purpose: Returns a GeneralExpression after a simplification |
29 | -- of the arguments of <me>. |
30 | returns any GeneralExpression |
31 | raises NumericError; |
32 | |
33 | Copy(me) |
34 | ---Purpose: Returns a copy of <me> having the same unknowns and functions. |
35 | returns mutable like me; |
36 | |
37 | IsIdentical(me; Other : GeneralExpression) |
38 | ---Purpose: Tests if <me> and <Other> define the same expression. |
39 | -- This method does not include any simplification before |
40 | -- testing. |
41 | returns Boolean; |
42 | |
43 | IsLinear(me) |
44 | returns Boolean; |
45 | |
46 | Derivative(me; X : NamedUnknown) |
47 | ---Purpose: Returns the derivative on <X> unknown of <me> |
48 | returns any GeneralExpression; |
49 | |
50 | NDerivative(me; X : NamedUnknown; N : Integer) |
51 | ---Purpose: Returns the <N>-th derivative on <X> unknown of <me>. |
52 | -- Raises OutOfRange if <N> <= 0 |
53 | returns any GeneralExpression |
54 | raises OutOfRange |
55 | is redefined; |
56 | |
57 | Evaluate(me; vars : Array1OfNamedUnknown; vals : Array1OfReal) |
58 | ---Purpose: Returns the value of <me> (as a Real) by |
59 | -- replacement of <vars> by <vals>. |
60 | -- Raises NotEvaluable if <me> contains NamedUnknown not |
61 | -- in <vars> or NumericError if result cannot be computed. |
62 | returns Real |
63 | raises NotEvaluable,NumericError; |
64 | |
65 | String(me) |
66 | ---Purpose: returns a string representing <me> in a readable way. |
67 | returns AsciiString; |
68 | |
69 | end Difference; |