Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AppParCurves / AppParCurves_BSpFunction.cdl
CommitLineData
7fd59977 1-- File: AppParCurves_BSpFunction.cdl
2-- Created: Tue Sep 21 18:02:28 1993
3-- Author: Modelistation
4-- <model@zerox>
5---Copyright: Matra Datavision 1993
6
7
8
9
10generic class BSpFunction from AppParCurves (
11 MultiLine as any;
12 ToolLine as any; -- as ToolLine(MultiLine)
13 Squares as any)
14
15 inherits MultipleVarFunctionWithGradient from math
16
17 ---Purpose: This function inherits MultipleVarFunctionWithGradient to be
18 -- used in the mathematical algorithm BFGS.
19 -- It computes the value of the function
20 -- F=sum(||Qui - B*Pi||)2 where Pi are Poles of the BSpline
21 -- curves approximating the given MultiLine SSP and ui the
22 -- parameters associated to the points Qi of SSP.
23 -- It also computes the gradient for values ui of the parameter.
24
25
26uses MultiBSpCurve from AppParCurves,
27 HArray1OfConstraintCouple from AppParCurves,
28 Constraint from AppParCurves,
29 Vector from math,
30 IntegerVector from math,
31 Matrix from math,
32 HArray1OfInteger from TColStd,
33 Array1OfReal from TColStd,
34 Array1OfInteger from TColStd
35
36is
37
38 Create(SSP: MultiLine; FirstPoint, LastPoint: Integer;
39 TheConstraints: HArray1OfConstraintCouple;
40 Parameters: Vector; Knots: Array1OfReal;
41 Mults: Array1OfInteger; NbPol: Integer)
42 ---Purpose: initializes the fields of the function. The approximating
43 -- curve has <NbPol> control points.
44
45 returns BSpFunction from AppParCurves;
46
47
48 NbVariables(me)
49 ---Purpose: returns the number of variables of the function. It
50 -- corresponds to the number of MultiPoints.
51
52 returns Integer
53 is static;
54
55
56
57 Perform(me: in out; X: Vector)
58 ---Purpose: this method is used each time Value or Gradient is
59 -- needed.
60
61 is static protected;
62
63
64 Value(me: in out; X: Vector; F: out Real)
65 ---Purpose: this method computes the new approximation of the
66 -- MultiLine
67 -- SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
68 -- point of the MultiLine.
69
70 returns Boolean
71 is static;
72
73
74 Gradient(me: in out; X: Vector; G: out Vector)
75 ---Purpose: returns the gradient G of the sum above for the
76 -- parameters Xi.
77
78 returns Boolean
79 is static;
80
81
82 Values(me: in out; X: Vector; F: out Real; G: out Vector)
83 ---Purpose: returns the value F=sum(||Pui - Bi*Pi||)2.
84 -- returns the value G = grad(F) for the parameters Xi.
85
86 returns Boolean
87 is static;
88
89
90
91 NewParameters(me)
92 ---Purpose: returns the new parameters of the MultiLine.
93 ---C++: return const&
94 returns Vector
95 is static;
96
97
98 CurveValue(me: in out)
99 ---Purpose: returns the MultiBSpCurve approximating the set after
100 -- computing the value F or Grad(F).
101
102 returns MultiBSpCurve from AppParCurves
103 is static;
104
105
106 Error(me: in out; IPoint, CurveIndex: Integer)
107 ---Purpose: returns the distance between the MultiPoint of range
108 -- IPoint and the curve CurveIndex.
109
110 returns Real
111 is static;
112
113
114 MaxError3d(me)
115 ---Purpose: returns the maximum distance between the points
116 -- and the MultiBSpCurve.
117
118 returns Real
119 is static;
120
121 MaxError2d(me)
122 ---Purpose: returns the maximum distance between the points
123 -- and the MultiBSpCurve.
124
125 returns Real
126 is static;
127
128
129 FunctionMatrix(me)
130 ---Purpose: returns the function matrix used to approximate the
131 -- multiline.
132 ---C++: return const&
133
134 returns Matrix from math
135 is static;
136
137
138 DerivativeFunctionMatrix(me)
139 ---Purpose: returns the derivative function matrix used to approximate the
140 -- multiline.
141 ---C++: return const&
142
143 returns Matrix from math
144 is static;
145
146
147
148 Index(me)
149 ---Purpose: Returns the indexes of the first non null values of
150 -- A and DA.
151 -- The values are non null from Index(ieme point) +1
152 -- to Index(ieme point) + degree +1.
153 ---C++: return const&
154
155 returns IntegerVector
156 is static;
157
158
159 FirstConstraint(me; TheConstraints: HArray1OfConstraintCouple;
160 FirstPoint: Integer)
161 ---Purpose:
162
163 returns Constraint from AppParCurves
164 is static;
165
166
167 LastConstraint(me; TheConstraints: HArray1OfConstraintCouple;
168 LastPoint: Integer)
169 ---Purpose:
170
171 returns Constraint from AppParCurves
172 is static;
173
174
175
176 SetFirstLambda(me: in out; l1: Real)
177 is static;
178
179
180 SetLastLambda(me: in out; l2: Real)
181 is static;
182
183
184fields
185
186Done: Boolean;
187MyMultiLine : MultiLine;
188MyMultiBSpCurve: MultiBSpCurve from AppParCurves;
189nbpoles: Integer;
190myParameters: Vector;
191FVal: Real;
192ValGrad_F: Vector from math;
193MyF: Matrix from math;
194PTLX : Matrix from math;
195PTLY : Matrix from math;
196PTLZ : Matrix from math;
197A: Matrix from math;
198DA: Matrix from math;
199MyLeastSquare : Squares;
200Contraintes: Boolean;
201NbP: Integer;
202NbCu: Integer;
203Adeb: Integer;
204Afin: Integer;
205tabdim: HArray1OfInteger from TColStd;
206ERR3d: Real;
207ERR2d: Real;
208FirstP: Integer;
209LastP: Integer;
210myConstraints: HArray1OfConstraintCouple from AppParCurves;
211mylambda1: Real;
212mylambda2: Real;
213
214end BSpFunction;