ocramz / sparse-linear-algebra

Numerical computation in native Haskell
GNU General Public License v3.0
88 stars 10 forks source link

Error for eigsQR #64

Open GregorySchwartz opened 6 years ago

GregorySchwartz commented 6 years ago
mat = sparsifySM $ fromListDenseSM 4 [0,1,1,0, 1,0,0,0, 1,0,0,1, 0,0,1,0] :: SpMatrix Double
eigsQR 100 False mat
*** Exception: Givens : no compatible rows for indices (3,2)

eigen in R returns:

$values
[1]  1.618034  0.618034 -0.618034 -1.618034

$vectors
          [,1]      [,2]      [,3]      [,4]
[1,] -0.601501 -0.371748 -0.371748  0.601501
[2,] -0.371748 -0.601501  0.601501 -0.371748
[3,] -0.601501  0.371748 -0.371748 -0.601501
[4,] -0.371748  0.601501  0.601501  0.371748