fixed loop unrolling error

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-12-22 10:34:12 +00:00
parent 008807938f
commit 4bd8d8bc13
2 changed files with 4 additions and 4 deletions

View File

@ -792,8 +792,8 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
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++];

View File

@ -174,6 +174,7 @@ public class EigenDecompositionImplTest extends TestCase {
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 @@ public class EigenDecompositionImplTest extends TestCase {
} while (norm2 * size < 0.01);
}
//return MatrixUtils.createRealMatrix(data);
return new RealMatrixImpl(data, false);
return MatrixUtils.createRealMatrix(data);
}