commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r728639 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/linear/DenseRealMatrix.java test/org/apache/commons/math/linear/EigenDecompositionImplTest.java
Date Mon, 22 Dec 2008 10:34:12 GMT
Author: luc
Date: Mon Dec 22 02:34:12 2008
New Revision: 728639

URL: http://svn.apache.org/viewvc?rev=728639&view=rev
Log:
fixed loop unrolling error

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/EigenDecompositionImplTest.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java?rev=728639&r1=728638&r2=728639&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
Mon Dec 22 02:34:12 2008
@@ -792,8 +792,8 @@
                                block[k + 1] * v[q + 1] +
                                block[k + 2] * v[q + 2] +
                                block[k + 3] * v[q + 3];
-                        ++k;
-                        ++q;
+                        k += 4;
+                        q += 4;
                     }
                     while (q < qEnd) {
                         sum += block[k++] * v[q++];

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/linear/EigenDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/EigenDecompositionImplTest.java?rev=728639&r1=728638&r2=728639&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/linear/EigenDecompositionImplTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/linear/EigenDecompositionImplTest.java
Mon Dec 22 02:34:12 2008
@@ -174,6 +174,7 @@
             double lambda = ed.getEigenvalue(i);
             RealVector v  = ed.getEigenvector(i);
             RealVector mV = matrix.operate(v);
+            System.out.println(lambda + " " + v + " " + mV);
             assertEquals(0, mV.subtract(v.mapMultiplyToSelf(lambda)).getNorm(), 1.0e-13);
         }
     }
@@ -366,8 +367,7 @@
             } while (norm2 * size < 0.01);
         }
 
-        //return MatrixUtils.createRealMatrix(data);
-        return new RealMatrixImpl(data, false);
+        return MatrixUtils.createRealMatrix(data);
 
     }
 



Mime
View raw message