This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Precision of Eigenvalues

Tags: None
(comma "," separated)
Blackclaws
Registered Member
Posts
3
Karma
0

Precision of Eigenvalues

Wed Nov 27, 2013 11:42 am
I'm calculating Eigenvalues for Dense Matrices using the .eigenvalues() function of MatrixXd. However running the program multiple times I start getting different results for matrices of size 1024x1024 and larger. Is there a way to increase the precision of the eigenvalues function?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Precision of Eigenvalues

Wed Nov 27, 2013 1:19 pm
If you get different results, this means the input matrix is different. There is no randomness in the computation of the eigenvalues. Please, be more specific about your issue.
Blackclaws
Registered Member
Posts
3
Karma
0

Re: Precision of Eigenvalues

Thu Nov 28, 2013 1:29 pm
Ok that is interesting I'll have to double check my code. It doesn't appear to contain randomness on my end either that is why it is strange that apparently the eigenvalues I get are different. Is the ordering of the eigenvalues random?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Precision of Eigenvalues

Thu Nov 28, 2013 6:58 pm
Eigenvalues are not sorted, but the same matrix must output the eigenvalues in same order.

BTW, if your matrix is symmetric you should use SelfAdjointEigenSolver<MatrixXd>(A).eigenvalues() which is faster and produces sorted eigenvalues because in this case we know they are real.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]