EigenvalueDecomposition { public EigenvalueDecomposition(final Matrix matrix) { final double[][] a = matrix.getData(); this.n = matrix.getCols(); this.v = new double[this.n][this.n]; this.d = new double[this.n]; this.e = new double[this.n]; this.issymmetric = isSymmetric(a); if (this.issymmetric) { for (int i = 0; i < this.n; i++) { System.arraycopy(a[i], 0, v[i], 0, this.n); } tred2(); tql2(); } else { this.h = new double[this.n][this.n]; this.ort = new double[this.n]; for (int j = 0; j < this.n; j++) { System.arraycopy(a, 0, h, 0, n); } orthes(); hqr2(); } } EigenvalueDecomposition(final Matrix matrix); Matrix getD(); double[] getImagEigenvalues(); double[] getRealEigenvalues(); Matrix getV();  }
@Test public void testEigenvalueDecomposition() { new EigenvalueDecomposition(matrix1); }