0025720: Incorrect code of math classes can lead to unpredicted behavior of algorithms
[occt.git] / src / math / math_FRPR.cdl
index 43972e0..a2704a1 100644 (file)
@@ -30,53 +30,40 @@ raises DimensionError from Standard,
 
 is
 
-    Create(F: in out MultipleVarFunctionWithGradient;
-          StartingPoint: Vector; Tolerance: Real;
-          NbIterations: Integer=200; ZEPS: Real=1.0e-12)
-       ---Purpose:       Computes FRPR minimization function F from input vector
-       -- StartingPoint. The solution F = Fi is found when 2.0 *
-       -- abs(Fi - Fi-1) <= Tolerance * (abs(Fi) + abs(Fi-1) +
-       -- ZEPS). The maximum number of iterations allowed is given
-       -- by NbIterations.
-    returns FRPR;
-    
-    
-    Create(F: in out MultipleVarFunctionWithGradient;
-          Tolerance: Real;
-          NbIterations: Integer = 200;
-          ZEPS: Real = 1.0e-12)
-       ---Purpose: Purpose
-       -- Initializes the computation of the minimum of F.
-       -- Warning
-       -- A call to the Perform method must be made after this
-       -- initialization to compute the minimum of the function.
+    Create(theFunction: in MultipleVarFunctionWithGradient;
+           theTolerance: Real;
+           theNbIterations: Integer = 200;
+           theZEPS: Real = 1.0e-12)
+    ---Purpose:
+    -- Initializes the computation of the minimum of F.
+    -- Warning: constructor does not perform computations.
     returns FRPR;
 
+    Delete(me) is static;
+    ---Purpose: Destructor alias.
     ---C++: alias "  Standard_EXPORT virtual ~math_FRPR();"
 
-    Perform(me: in out; F: in out MultipleVarFunctionWithGradient; 
-           StartingPoint: Vector)
-       ---Purpose: Use this method after a call to the initialization constructor
-       -- to compute the minimum of function F.
-       -- Warning
-       -- The initialization constructor must have been called before
-       -- the Perform method is called
 
+    Perform(me: in out;
+            theFunction: in out MultipleVarFunctionWithGradient; 
+            theStartingPoint: Vector)
+    ---Purpose:
+    -- The solution F = Fi is found when
+    -- 2.0 * abs(Fi - Fi-1) <= Tolerance * (abs(Fi) + abs(Fi-1) + ZEPS).
     is static;
 
 
-    IsSolutionReached(me: in out; F: in out MultipleVarFunctionWithGradient)
-       ---Purpose:
-       -- The solution F = Fi is found when :
-       --   2.0 * abs(Fi - Fi-1) <= Tolerance * (abs(Fi) + abs(Fi-1)) + ZEPS.
-       -- The maximum number of iterations allowed is given by NbIterations.
-    
-    returns Boolean
-    is virtual;
-    
-    
+    IsSolutionReached(me: in out; theFunction: in out MultipleVarFunctionWithGradient)
+    ---Purpose:
+    -- The solution F = Fi is found when:
+    --   2.0 * abs(Fi - Fi-1) <= Tolerance * (abs(Fi) + abs(Fi-1)) + ZEPS.
+    -- The maximum number of iterations allowed is given by NbIterations.
+    ---C++:inline
+    returns Boolean is virtual;
+
+
     IsDone(me)
-       ---Purpose: Returns true if the computations are successful, otherwise returns false.
+        ---Purpose: Returns true if the computations are successful, otherwise returns false.
         ---C++: inline
     returns Boolean
     is static;
@@ -158,6 +145,7 @@ is
 
 
 fields
+
 Done:            Boolean;
 TheLocation:     Vector is protected;
 TheGradient:     Vector is protected;