]> OCCT Git - occt.git/commitdiff
0027475: Incomplete direction for Powell method in math_GlobOptMin
authoraml <aml@opencascade.com>
Fri, 6 May 2016 11:57:20 +0000 (14:57 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 12 May 2016 08:52:05 +0000 (11:52 +0300)
Directions are changed to be valid orthogonal set.

src/math/math_GlobOptMin.cxx

index abe10831c9719191c42d4b385fc69cb12e34a718..8008ab33dad2dc9e115f3de0f551ba331b955f7a 100644 (file)
@@ -313,7 +313,7 @@ Standard_Boolean math_GlobOptMin::computeLocalExtremum(const math_Vector& thePnt
   {
     math_Matrix m(1, myN, 1, myN, 0.0);
     for(i = 1; i <= myN; i++)
-      m(1, 1) = 1.0;
+      m(i, i) = 1.0;
 
     math_Powell powell(*myFunc, 1e-10);
     powell.Perform(*myFunc, thePnt, m);