0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / Extrema / Extrema_FuncExtPC.cdl
CommitLineData
b311480e 1-- Created on: 1991-07-24
2-- Created by: Michel CHAUVAT
3-- Copyright (c) 1991-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
22
23private generic class FuncExtPC from Extrema
24(Curve as any;
25 Tool as any;
26 POnC as any;
27 Pnt as any;
28 Vec as any)
29
30 inherits FunctionWithDerivative from math
0d969553
Y
31 --- Purpose: Function to find extrema of the distance between a
32 --- point and a curve.
7fd59977 33
34uses SequenceOfReal from TColStd,
35 SequenceOfInteger from TColStd
36
37raises OutOfRange from Standard,
38 TypeMismatch from Standard
39
40private class SeqPC instantiates Sequence from TCollection(POnC);
41
42
43is
44
45 Create returns FuncExtPC;
46
47 Create (P: Pnt; C: Curve) returns FuncExtPC;
48 ---Purpose:
49
50 Initialize(me: in out; C: Curve)
51 ---Purpose: sets the field mycurve of the function.
52 is static;
53
54 SetPoint(me: in out; P: Pnt)
55 ---Purpose: sets the field P of the function.
56 is static;
57
58
59 -- In all next methods, an exception is raised if the fields
60 -- were not initialized.
61
62 Value (me: in out; U: Real; F: out Real) returns Boolean;
0d969553 63 ---Purpose: Calculation of F(U).
7fd59977 64
65 Derivative (me: in out; U: Real; DF: out Real) returns Boolean;
0d969553 66 ---Purpose: Calculation of F'(U).
7fd59977 67
68 Values (me: in out; U: Real; F,DF: out Real) returns Boolean;
0d969553 69 ---Purpose: Calculation of F(U) and F'(U).
7fd59977 70
71 GetStateNumber (me: in out) returns Integer
0d969553 72 ---Purpose: Save the found extremum.
7fd59977 73 is redefined;
74
75 NbExt (me) returns Integer
0d969553 76 ---Purpose: Return the nunber of found extrema.
7fd59977 77 raises TypeMismatch from Standard;
78
79 SquareDistance (me; N: Integer) returns Real
0d969553 80 ---Purpose: Returns the Nth distance.
7fd59977 81 raises OutOfRange from Standard,
82 TypeMismatch from Standard;
0d969553 83 -- if N < 1 or N > NbExt(me).
7fd59977 84
85 IsMin (me; N: Integer) returns Boolean
0d969553 86 ---Purpose: Shows if the Nth distance is a minimum.
7fd59977 87 raises OutOfRange from Standard,
88 TypeMismatch from Standard;
0d969553 89 -- if N < 1 or N > NbExt(me).
7fd59977 90
91 Point (me; N: Integer) returns POnC
0d969553 92 ---Purpose: Returns the Nth extremum.
7fd59977 93 raises OutOfRange from Standard,
94 TypeMismatch from Standard;
0d969553 95 -- if N < 1 or N > NbExt(me).
7fd59977 96
32ca7a51 97 SubIntervalInitialize(me: in out; theUfirst, theUlast: Real from Standard);
98 ---Purpose: Determines boundaries of subinterval for find of root.
99
100 SearchOfTolerance(me: in out) returns Real from Standard;
101 ---Purpose: Computes a Tol value. If 1st derivative of curve
102 -- |D1|<Tol, it is considered D1=0.
103
104
7fd59977 105fields
106 myP : Pnt;
107 myC : Address from Standard;
108
0d969553
Y
109 myU : Real; -- current
110 myPc : Pnt; -- current point
111 myD1f : Real; -- value of derivative of the function
7fd59977 112
113 mySqDist: SequenceOfReal from TColStd;
114 myIsMin: SequenceOfInteger from TColStd;
115 myPoint: SeqPC;
116 myPinit: Boolean;
117 myCinit: Boolean;
118 myD1Init: Boolean;
32ca7a51 119
120 myTol: Real from Standard; -- toolerance for derivate
121
122--Supremum of search 1st non-zero derivative
123 myMaxDerivOrder: Integer from Standard;
124
125--boundaries of subinterval for find of root
126 myUinfium, myUsupremum: Real from Standard;
127
7fd59977 128
129end FuncExtPC;