[
https://issues.apache.org/jira/browse/MATH-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14234192#comment-14234192
]
Gilles commented on MATH-1176:
------------------------------
"QRDecompositionTest" contains a test with the *transposed* matrix of your
example, and a check for singularity that _passes_.
Here are the values of "rDiag"
* for the case reported:
rDiag: -8.12403840463596, 0.9045340337332888, 2.220446049250313E-16
* for the transpose:
rDiag: -3.7416573867739413, 1.9639610121239321, 0.0
> QRDecomposition does not detect the matrix singularity
> ------------------------------------------------------
>
> Key: MATH-1176
> URL: https://issues.apache.org/jira/browse/MATH-1176
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: alberto trivellato
> Priority: Minor
>
> QRDecomposition fails this test. The default contructor sets the threshold=0,
> so we will never have abs(Rii) <= 0
> public void testSimpleRankDeficient() throws Exception {
> double[][] A = new double[][] {
> { 1, 2, 3 },
> { 4, 5, 6 },
> { 7, 8, 9 }};
> //this matrix is singular
>
> RealMatrix M2 = MatrixUtils.createRealMatrix(A);
> QRDecomposition qr2 = new QRDecomposition(M2);
> assertFalse(qr2.getSolver().isNonSingular());//this fails
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)