Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
Description
As reported by Axel Kramer on commons-dev, the following test case succeeds, but should fail:
public void testEigenDecomposition() { double[][] m = { { 0.0, 1.0, -1.0 }, { 1.0, 1.0, 0.0 }, { -1.0,0.0, 1.0 } }; RealMatrix rm = new Array2DRowRealMatrix(m); assertEquals(rm.toString(), "Array2DRowRealMatrix{{0.0,1.0,-1.0},{1.0,1.0,0.0},{-1.0,0.0,1.0}}"); EigenDecompositionImpl ed = new EigenDecompositionImpl(rm, MathUtils.SAFE_MIN); RealVector rv0 = ed.getEigenvector(0); assertEquals(rv0.toString(), "{(NaN); (NaN); (NaN)}"); }
ed.getRealEigenvalues() returns the correct eigenvalues (2, 1, -1), but all three eigenvectors contain only NaNs.