Cameron McBride <cameron.mcbride / gmail.com> wrote:

> Do you know right off how its accuracy compares to GSL/LAPACK routines?

I don't know, however i found a discreapency between GSL and
extendedMatrix for eigenvectors :

require 'extendmatrix.rb'

a = Matrix[ [ 0, 1, 1, 0 ], 
            [ 1, 0, 1, 0 ],
            [ 1, 1, 0, 1 ],
            [ 0, 0, 1, 0 ] ]
            
p a.det
# => 2
p a.trace
# => 0
p a.eigenvaluesJacobi
# Vector[-1.0, 2.17008648662603, -1.48119430409202, 0.311107817465982]
# GSL : a.eigval = [ 2.170e+00 3.111e-01 -1.000e+00 -1.481e+00 ]
p a.cJacobiV
=begin
Matrix[[0.707106781186547, 0.522720725656538, -0.302028136647909,
-0.368160355880552], 
      [-0.707106781186547, 0.522720725656538, -0.302028136647909,
-0.368160355880552], 
      [0.0, 0.611628457346727, 0.749390492326316, 0.253622791118195], 
      [0.0, 0.281845198827065, -0.505936655478633, 0.815224744804294]]
GSL : a.eigvec = 
    [  5.227e-01  3.682e-01 -7.071e-01  3.020e-01 
       5.227e-01  3.682e-01  7.071e-01  3.020e-01 
       6.116e-01 -2.536e-01 -9.158e-16 -7.494e-01 
       2.818e-01 -8.152e-01  4.852e-16  5.059e-01 ]
=end

the eigenvalues are "the same" however eigenvectors doesn't have even
the same sign to within a multiplicative constant ???

what did i miss this morning ?
a cofee cup ??
-- 
Une Bue