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

EigenDecomposition.Solver should consider tiny values 0 for purposes of determining singularity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 3.3
    • None

    Description

      EigenDecomposition.Solver tests for singularity by comparing eigenvalues to 0 for exact equality. Elsewhere in the class and in the code, of course, very small values are considered 0. This causes the solver to consider some singular matrices as non-singular.

      The patch here includes a test as well showing the behavior – the matrix is clearly singular but isn't considered as such since one eigenvalue are ~1e-14 rather than exactly 0.

      (What I am not sure of is whether we should really be evaluating the norm of the imaginary eigenvalues rather than real/imag components separately. But the javadoc says the solver only supports real eigenvalues anyhow, so it's kind of moot since imag=0 for all eigenvalues.)

      Attachments

        1. MATH-1045.patch
          2 kB
          Sean R. Owen
        2. MATH-1045.patch
          3 kB
          Sean R. Owen
        3. MATH-1045_2.patch
          2 kB
          Sean R. Owen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srowen Sean R. Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: