LUDecomposition { public DecompositionSolver getSolver() { return new Solver(lu, pivot, singular); } LUDecomposition(RealMatrix matrix);  LUDecomposition(RealMatrix matrix, double singularityThreshold); RealMatrix getL(); RealMatrix getU(); RealMatrix getP(); int[] getPivot(); double getDeterminant(); DecompositionSolver getSolver();  }
@Test public void testSingular() { LUDecomposition lu = new LUDecomposition(MatrixUtils.createRealMatrix(testData)); Assert.assertTrue(lu.getSolver().isNonSingular()); lu = new LUDecomposition(MatrixUtils.createRealMatrix(singular)); Assert.assertFalse(lu.getSolver().isNonSingular()); lu = new LUDecomposition(MatrixUtils.createRealMatrix(bigSingular)); Assert.assertFalse(lu.getSolver().isNonSingular()); }