EigenvalueDecomposition { public double[] getRealEigenvalues() { return this.d; } EigenvalueDecomposition(final Matrix matrix); Matrix getD(); double[] getImagEigenvalues(); double[] getRealEigenvalues(); Matrix getV();  }
@Test public void testGetRealEigenvalues_symentric() { EigenvalueDecomposition decomposition = new EigenvalueDecomposition(matrix2); double[] d = decomposition.getRealEigenvalues(); assertEquals(2, d.length); assertEquals(-5.2008771255, d[0], 1e-10); assertEquals(6.2008771255, d[1], 1e-10); }
@Test public void testGetRealEigenvalues_asymentric() { EigenvalueDecomposition decomposition = new EigenvalueDecomposition(matrix1); double[] d = decomposition.getRealEigenvalues(); assertEquals(2, d.length); assertEquals(1.45, d[0], 1e-10); assertEquals(1.45, d[1], 1e-10); }