Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QR algorithm #472

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Commits on Nov 6, 2023

  1. Replace array_search with floating-point filter

    array_search seems to fail in most cases when looking for a float in an array of floats. And even if it does find a match, if the key is 0, php evaluates `!0` to true.
    
    To find a match, we can instead loop through and compare the numbers with `Arithmetic::almostEqual` and then explicitly check if `$key === false`
    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    cd45a97 View commit details
    Browse the repository at this point in the history
  2. Make 8.2 linter happy

    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    7c75688 View commit details
    Browse the repository at this point in the history
  3. Add NumericaMatrix->upperHessenberg

    Converts a matrix to hessenberg form using householder reflections
    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    22ffbbf View commit details
    Browse the repository at this point in the history
  4. Test uppserHessenberg

    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    9fb768a View commit details
    Browse the repository at this point in the history
  5. Add qrAlgorithm

    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    44637c3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    51ba07e View commit details
    Browse the repository at this point in the history
  7. Shift QR by Wilkinson, refactor a bit

    The Wilkinson shift accelerates the rate of convergence for the QR algorithm - it's in the static calcShift helper
    
    Additionally, moved the iteration to an inner helper function to hide the $values parameter from the public method
    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    edb1bb3 View commit details
    Browse the repository at this point in the history
  8. Add qr method to Eigenvector

    Just gets the eigenvalues from the qr algorithm and feeds them to the eigenvectors method
    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    51a36e9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6b445d9 View commit details
    Browse the repository at this point in the history
  10. Add failing eigenvector cases to eigenvalues

    They work, so the problem must be in the eigenvectors method
    Aweptimum committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    2f08e84 View commit details
    Browse the repository at this point in the history