LUDecompositionCommons extends Decomposition<LUDecompositionResult> implements Serializable { @Override public LUDecompositionResult evaluate(final DoubleMatrix2D x) { Validate.notNull(x); final RealMatrix temp = CommonsMathWrapper.wrap(x); final LUDecomposition lu = new LUDecompositionImpl(temp); return new LUDecompositionCommonsResult(lu); }  @Override LUDecompositionResult evaluate(final DoubleMatrix2D x);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullObjectMatrix() { LU.evaluate((DoubleMatrix2D) null); }
@Test public void testRecoverOrginal() { final DecompositionResult result = LU.evaluate(A); assertTrue(result instanceof LUDecompositionResult); final LUDecompositionResult lu = (LUDecompositionResult) result; final DoubleMatrix2D a = (DoubleMatrix2D) ALGEBRA.multiply(lu.getL(), lu.getU()); checkEquals((DoubleMatrix2D) ALGEBRA.multiply(lu.getP(), A), a); }