[vtkusers] Jacobi eigenvectors incorrect?

David Doria daviddoria+vtk at gmail.com
Tue Oct 27 09:18:58 EDT 2009


On Tue, Oct 27, 2009 at 8:39 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> According to the documentation in vtkMath.cxx, the code
> vtkJacobiN finds the solution of an nxn real SYMMETRIC matrix.
> Can you try your tests with a symmetric matrix and compare the results
> between vtk and matlab.
>
> Bill

You're right, the test matrix I used was not symmetric, but the matrix
that brought this to my attention was a covariance matrix so it was
(supposedly) symmetric. Can we add an "IsSymmetric()" type of call at
the beginning of the function? Maybe Jacobi() should do that check and
then if you claim you know what you are doing you can use JacobiFast()
or something like that to skip the test? I don't think it EVER makes
sense to return values without a flag that says if the values are
valid.

As for easier matrix contruction - does vtkDenseArray have a GetData()
function that would return a row major order array that we could use
as an interface to Jacobi? It would be MUCH easier to construct a
matrix when you are able to use
matrix(row, col) = value
style notation.

I am out of town for the rest of the week but when I get back I'll
check the eigenvalues of my supposed symmetric matrix.

Thanks,

David



More information about the vtkusers mailing list