FieldLUDecomposition { public FieldDecompositionSolver<T> getSolver() { return new Solver<T>(field, lu, pivot, singular); } FieldLUDecomposition(FieldMatrix<T> matrix); FieldMatrix<T> getL(); FieldMatrix<T> getU(); FieldMatrix<T> getP(); int[] getPivot(); T getDeterminant(); FieldDecompositionSolver<T> getSolver();  }
@Test public void testSingular() { FieldLUDecomposition<Fraction> lu = new FieldLUDecomposition<Fraction>(new Array2DRowFieldMatrix<Fraction>(FractionField.getInstance(), testData)); Assert.assertTrue(lu.getSolver().isNonSingular()); lu = new FieldLUDecomposition<Fraction>(new Array2DRowFieldMatrix<Fraction>(FractionField.getInstance(), singular)); Assert.assertFalse(lu.getSolver().isNonSingular()); lu = new FieldLUDecomposition<Fraction>(new Array2DRowFieldMatrix<Fraction>(FractionField.getInstance(), bigSingular)); Assert.assertFalse(lu.getSolver().isNonSingular()); }