felipeZ / eigenvalues

symmetric matrices algorithms to compute eigenvalue/eigenvector pairs
Apache License 2.0
42 stars 11 forks source link

Patch 1 #24

Closed hamdav closed 2 years ago

hamdav commented 2 years ago

I discovered two bugs in the algorithm.

  1. on line 73 you subtracted (the projection onto v_k) times v_i, when it should have been times v_k
  2. When beta[i] is lower than the tolerance, a new random vector that is orthogonal to the previous vs should be made the next v, not an unnormalised version of the linearly dependent one.

Cheers

felipeZ commented 2 years ago

@hamdav Thanks for the patch! I'm merging your changes and will prepare a new release