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