EigenDecomposition { public RealMatrix getV() { if (cachedV == null) { final int m = eigenvectors.length; cachedV = MatrixUtils.createRealMatrix(m, m); for (int k = 0; k < m; ++k) { cachedV.setColumnVector(k, eigenvectors[k]); } } return cachedV; } EigenDecomposition(final RealMatrix matrix); @Deprecated  EigenDecomposition(final RealMatrix matrix,
                              final double splitTolerance);  EigenDecomposition(final double[] main, final double[] secondary); @Deprecated  EigenDecomposition(final double[] main, final double[] secondary,
                              final double splitTolerance); RealMatrix getV(); RealMatrix getD(); RealMatrix getVT(); boolean hasComplexEigenvalues(); double[] getRealEigenvalues(); double getRealEigenvalue(final int i); double[] getImagEigenvalues(); double getImagEigenvalue(final int i); RealVector getEigenvector(final int i); double getDeterminant(); RealMatrix getSquareRoot(); DecompositionSolver getSolver();  }
@Test public void testVOrthogonal() { RealMatrix v = new EigenDecomposition(matrix).getV(); RealMatrix vTv = v.transpose().multiply(v); RealMatrix id = MatrixUtils.createRealIdentityMatrix(vTv.getRowDimension()); Assert.assertEquals(0, vTv.subtract(id).getNorm(), 2.0e-13); }