HessenbergTransformer { public RealMatrix getH() { if (cachedH == null) { final int m = householderVectors.length; final double[][] h = new double[m][m]; for (int i = 0; i < m; ++i) { if (i > 0) { h[i][i - 1] = householderVectors[i][i - 1]; } for (int j = i; j < m; ++j) { h[i][j] = householderVectors[i][j]; } } cachedH = MatrixUtils.createRealMatrix(h); } return cachedH; } HessenbergTransformer(final RealMatrix matrix); RealMatrix getP(); RealMatrix getPT(); RealMatrix getH();  }
@Test public void testHessenbergForm() { checkHessenbergForm(new HessenbergTransformer(MatrixUtils.createRealMatrix(testSquare5)).getH()); checkHessenbergForm(new HessenbergTransformer(MatrixUtils.createRealMatrix(testSquare3)).getH()); }