Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1176

QRDecomposition does not detect the matrix singularity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 3.3
    • 4.X
    • None
    • None

    Description

      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
      }

      Attachments

        1. MATH-1176.failing.patch
          0.8 kB
          Gilles Sadowski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              albert_triv alberto trivellato
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: