7fd59977 |
1 | -- File: GaussMultipleIntegration.cdl |
2 | -- Created: Tue May 14 18:22:12 1991 |
3 | -- Author: Laurent PAINNOT |
4 | -- <lpa@topsn3> |
5 | ---Copyright: Matra Datavision 1991, 1992 |
6 | |
7 | |
8 | |
9 | class GaussMultipleIntegration from math |
10 | ---Purpose: |
11 | -- This class implements the integration of a function of multiple |
12 | -- variables between the parameter bounds Lower[a..b] and Upper[a..b]. |
13 | -- Warning: Each element of Order must be inferior or equal to 61. |
14 | |
15 | |
16 | uses Vector from math, |
17 | IntegerVector from math, |
18 | MultipleVarFunction from math, |
19 | OStream from Standard |
20 | |
21 | raises NotDone from StdFail |
22 | |
23 | is |
24 | |
25 | Create(F: in out MultipleVarFunction; Lower, Upper: Vector; |
26 | Order: IntegerVector) |
27 | ---Purpose: |
28 | -- The Gauss-Legendre integration with Order = points of |
29 | -- integration for each unknow, is done on the function F |
30 | -- between the bounds Lower and Upper. |
31 | |
32 | returns GaussMultipleIntegration; |
33 | |
34 | IsDone(me) |
35 | ---Purpose: returns True if all has been correctly done. |
36 | ---C++: inline |
37 | |
38 | returns Boolean |
39 | is static; |
40 | |
41 | Value(me) |
42 | ---Purpose: returns the value of the integral. |
43 | ---C++: inline |
44 | |
45 | returns Real |
46 | raises NotDone |
47 | is static; |
48 | |
49 | |
50 | Dump(me; o: in out OStream) |
51 | ---Purpose: Prints information on the current state of the object. |
52 | |
53 | is static; |
54 | |
55 | |
56 | |
57 | fields |
58 | |
59 | Val: Real; |
60 | Done: Boolean; |
61 | |
62 | end GaussMultipleIntegration; |