0023024: Update headers of OCCT files
[occt.git] / src / AdvApprox / AdvApprox_SimpleApprox.cdl
CommitLineData
b311480e 1-- Created on: 1996-10-14
2-- Created by: Jeannine PANTIATICI
3-- Copyright (c) 1996-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22class SimpleApprox from AdvApprox
23
24---Purpose: Approximate a function on an intervall [First,Last]
25-- The result is a simple polynomial whose degree is as low as
26-- possible to satisfy the required tolerance and the
27-- maximum degree. The maximum error and the averrage error
28-- resulting from approximating the function by the polynomial are computed
29
30
31uses HArray1OfReal from TColStd,
32 HArray2OfReal from TColStd,
33 Array1OfReal from TColStd,
34 Array1OfInteger from TColStd,
35 Shape from GeomAbs,
36 Vector from math,
37 EvaluatorFunction from AdvApprox,
38 JacobiPolynomial from PLib
39
40raises
41
42 OutOfRange from Standard,
43 ConstructionError from Standard
44
45is
46 Create(TotalDimension : Integer ;
47 TotalNumSS : Integer ;
48 Continuity : Shape from GeomAbs ;
49 WorkDegree : Integer ;
50 NbGaussPoints : Integer ;
51 JacobiBase : JacobiPolynomial from PLib;
52 Func : EvaluatorFunction from AdvApprox)
53
54 returns SimpleApprox from AdvApprox
55 raises ConstructionError;
56
57 Perform(me:in out ;
58 LocalDimension : Array1OfInteger from TColStd;
59 LocalTolerancesArray: Array1OfReal from TColStd ;
60 First : Real ;
61 Last : Real ;
62 MaxDegree : Integer)
63 raises ConstructionError;
64 ---Purpose: Constructs approximator tool.
65 --
66 -- Warning:
67 -- the Func should be valid reference to object of type
68 -- inherited from class EvaluatorFunction from Approx
69 -- with life time longer than that of the approximator tool;
70 --
71
72 IsDone(me)
73 returns Boolean;
74
75 Degree (me)
76 returns Integer;
77
78 Coefficients (me)
79 ---Purpose: returns the coefficients in the Jacobi Base
80 returns HArray1OfReal from TColStd;
81
82 FirstConstr (me)
83 ---Purpose: returns the constraints at First
84 returns HArray2OfReal from TColStd;
85
86 LastConstr (me)
87 ---Purpose: returns the constraints at Last
88 returns HArray2OfReal from TColStd;
89
90 SomTab (me)
91 returns HArray1OfReal from TColStd;
92
93 DifTab (me)
94 returns HArray1OfReal from TColStd;
95
96 MaxError (me; Index : Integer)
97 returns Real;
98
99 AverageError (me; Index : Integer)
100 returns Real;
101
102 Dump(me; o: in out OStream);
103 ---Purpose: display information on approximation
104
105fields
106
107 myTotalNumSS : Integer;
108 myTotalDimension : Integer;
109 myNbGaussPoints : Integer;
110 myWorkDegree : Integer;
111 myNivConstr : Integer ;
112 myJacPol : JacobiPolynomial from PLib;
113 myTabPoints : HArray1OfReal from TColStd;
114 myTabWeights : HArray2OfReal from TColStd;
115 myEvaluator : Address from Standard;
116 myDegree : Integer;
117 myCoeff : HArray1OfReal from TColStd;
118 myFirstConstr : HArray2OfReal from TColStd;
119 myLastConstr : HArray2OfReal from TColStd;
120 mySomTab : HArray1OfReal from TColStd;
121 myDifTab : HArray1OfReal from TColStd;
122 myMaxError : HArray1OfReal from TColStd;
123 myAverageError : HArray1OfReal from TColStd;
124 done : Boolean;
125
126end SimpleApprox;
127
128