diff --git a/src/java/org/apache/commons/math/linear/LUDecomposition.java b/src/java/org/apache/commons/math/linear/LUDecomposition.java index 1504ca835..da6133325 100644 --- a/src/java/org/apache/commons/math/linear/LUDecomposition.java +++ b/src/java/org/apache/commons/math/linear/LUDecomposition.java @@ -29,8 +29,14 @@ import java.io.Serializable; *

This interface is based on the class with similar name from the now defunct * JAMA library.

* * * @see MathWorld @@ -72,18 +78,6 @@ public interface LUDecomposition extends Serializable { */ int[] getPivot(); - /** - * Get permutation parity. - * @return true if there was an even number of permutations - */ - boolean evenPermutation(); - - /** - * Get the singularity indicator. - * @return singularity indicator - */ - boolean isSingular(); - /** * Return the determinant of the matrix * @return determinant of the matrix @@ -91,7 +85,7 @@ public interface LUDecomposition extends Serializable { double getDeterminant(); /** - * Get a solver for A × X = B. + * Get a solver for finding the A × X = B solution in exact linear sense. * @return a solver */ DecompositionSolver getSolver(); diff --git a/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java b/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java index b3d9a5288..759b50360 100644 --- a/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java +++ b/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java @@ -224,16 +224,6 @@ public class LUDecompositionImpl implements LUDecomposition { } } - /** {@inheritDoc} */ - public boolean isSingular() { - return singular; - } - - /** {@inheritDoc} */ - public boolean evenPermutation() { - return even; - } - /** {@inheritDoc} */ public DecompositionSolver getSolver() { return new Solver(lu, pivot, singular); diff --git a/src/test/org/apache/commons/math/linear/LUDecompositionImplTest.java b/src/test/org/apache/commons/math/linear/LUDecompositionImplTest.java index 95f4e2c26..dbb6223ec 100644 --- a/src/test/org/apache/commons/math/linear/LUDecompositionImplTest.java +++ b/src/test/org/apache/commons/math/linear/LUDecompositionImplTest.java @@ -116,14 +116,14 @@ public class LUDecompositionImplTest extends TestCase { matrix = MatrixUtils.createRealMatrix(singular); lu = new LUDecompositionImpl(matrix); - assertTrue(lu.isSingular()); + assertFalse(lu.getSolver().isNonSingular()); assertNull(lu.getL()); assertNull(lu.getU()); assertNull(lu.getP()); matrix = MatrixUtils.createRealMatrix(bigSingular); lu = new LUDecompositionImpl(matrix); - assertTrue(lu.isSingular()); + assertFalse(lu.getSolver().isNonSingular()); assertNull(lu.getL()); assertNull(lu.getU()); assertNull(lu.getP()); @@ -207,11 +207,11 @@ public class LUDecompositionImplTest extends TestCase { public void testSingular() { LUDecomposition lu = new LUDecompositionImpl(MatrixUtils.createRealMatrix(testData)); - assertFalse(lu.isSingular()); + assertTrue(lu.getSolver().isNonSingular()); lu = new LUDecompositionImpl(MatrixUtils.createRealMatrix(singular)); - assertTrue(lu.isSingular()); + assertFalse(lu.getSolver().isNonSingular()); lu = new LUDecompositionImpl(MatrixUtils.createRealMatrix(bigSingular)); - assertTrue(lu.isSingular()); + assertFalse(lu.getSolver().isNonSingular()); } /** test matrices values */