blob: e65bb2f5b24a9a645d3dc2d84a8935c35a460f3b (
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
|
-- File: AdvApprox_SimpleApprox.cdl
-- Created: Mon Oct 14 18:05:03 1996
-- Author: Jeannine PANTIATICI
-- <jpi@sgi64>
---Copyright: Matra Datavision 1996
class SimpleApprox from AdvApprox
---Purpose: Approximate a function on an intervall [First,Last]
-- The result is a simple polynomial whose degree is as low as
-- possible to satisfy the required tolerance and the
-- maximum degree. The maximum error and the averrage error
-- resulting from approximating the function by the polynomial are computed
uses HArray1OfReal from TColStd,
HArray2OfReal from TColStd,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Shape from GeomAbs,
Vector from math,
EvaluatorFunction from AdvApprox,
JacobiPolynomial from PLib
raises
OutOfRange from Standard,
ConstructionError from Standard
is
Create(TotalDimension : Integer ;
TotalNumSS : Integer ;
Continuity : Shape from GeomAbs ;
WorkDegree : Integer ;
NbGaussPoints : Integer ;
JacobiBase : JacobiPolynomial from PLib;
Func : EvaluatorFunction from AdvApprox)
returns SimpleApprox from AdvApprox
raises ConstructionError;
Perform(me:in out ;
LocalDimension : Array1OfInteger from TColStd;
LocalTolerancesArray: Array1OfReal from TColStd ;
First : Real ;
Last : Real ;
MaxDegree : Integer)
raises ConstructionError;
---Purpose: Constructs approximator tool.
--
-- Warning:
-- the Func should be valid reference to object of type
-- inherited from class EvaluatorFunction from Approx
-- with life time longer than that of the approximator tool;
--
IsDone(me)
returns Boolean;
Degree (me)
returns Integer;
Coefficients (me)
---Purpose: returns the coefficients in the Jacobi Base
returns HArray1OfReal from TColStd;
FirstConstr (me)
---Purpose: returns the constraints at First
returns HArray2OfReal from TColStd;
LastConstr (me)
---Purpose: returns the constraints at Last
returns HArray2OfReal from TColStd;
SomTab (me)
returns HArray1OfReal from TColStd;
DifTab (me)
returns HArray1OfReal from TColStd;
MaxError (me; Index : Integer)
returns Real;
AverageError (me; Index : Integer)
returns Real;
Dump(me; o: in out OStream);
---Purpose: display information on approximation
fields
myTotalNumSS : Integer;
myTotalDimension : Integer;
myNbGaussPoints : Integer;
myWorkDegree : Integer;
myNivConstr : Integer ;
myJacPol : JacobiPolynomial from PLib;
myTabPoints : HArray1OfReal from TColStd;
myTabWeights : HArray2OfReal from TColStd;
myEvaluator : Address from Standard;
myDegree : Integer;
myCoeff : HArray1OfReal from TColStd;
myFirstConstr : HArray2OfReal from TColStd;
myLastConstr : HArray2OfReal from TColStd;
mySomTab : HArray1OfReal from TColStd;
myDifTab : HArray1OfReal from TColStd;
myMaxError : HArray1OfReal from TColStd;
myAverageError : HArray1OfReal from TColStd;
done : Boolean;
end SimpleApprox;
|