CholeskyDecompositionCommons extends Decomposition<CholeskyDecompositionResult> { @Override public CholeskyDecompositionResult evaluate(final DoubleMatrix2D x) { Validate.notNull(x); final RealMatrix temp = CommonsMathWrapper.wrap(x); CholeskyDecomposition cholesky; try { cholesky = new CholeskyDecompositionImpl(temp); } catch (Exception e) { throw new MathException(e.toString()); } return new CholeskyDecompositionCommonsResult(cholesky); }  @Override CholeskyDecompositionResult evaluate(final DoubleMatrix2D x);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullObjectMatrix() { CH.evaluate((DoubleMatrix2D) null); }
@Test public void testRecoverOrginal() { final DecompositionResult result = CH.evaluate(A); assertTrue(result instanceof CholeskyDecompositionResult); final CholeskyDecompositionResult ch = (CholeskyDecompositionResult) result; final DoubleMatrix2D a = (DoubleMatrix2D) ALGEBRA.multiply(ch.getL(), ch.getLT()); checkEquals(A, a); }