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

Determinant of a sparse matrix

Tags: None
(comma "," separated)
pidanchen
Registered Member
Posts
20
Karma
0

Determinant of a sparse matrix

Mon Nov 14, 2011 11:59 pm
Hello

I would like to know how to compute the determinant of a sparse symmetric matrix in Eigen? Or any simple way to evaluate if it is singular or not?


thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Determinant of a sparse matrix

Tue Nov 15, 2011 6:59 pm
If your matrix is symmetric positive definite, then Eigen::SimplicialLDLt will do (from the SparseCholesky module). You need to use the default branch. Otherwise, you will have to rely on an external library, either SuperLU or UmfPack via our SuperLU or UmfPackLU wrapper classes (SuperLUSupport and UmfPackSupport modules).
pidanchen
Registered Member
Posts
20
Karma
0

Re: Determinant of a sparse matrix

Tue Nov 15, 2011 7:30 pm
I am solving A*x = B where x is sparse symmetric. I am using simplicialCholesky, however, I need to check whether A is positive definite or not. :( Seems that there is no way to work around.


ggael wrote:If your matrix is symmetric positive definite, then Eigen::SimplicialLDLt will do (from the SparseCholesky module). You need to use the default branch. Otherwise, you will have to rely on an external library, either SuperLU or UmfPack via our SuperLU or UmfPackLU wrapper classes (SuperLUSupport and UmfPackSupport modules).
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Determinant of a sparse matrix

Wed Nov 16, 2011 7:53 pm
What about calling the info() method after the numerical factorization?


Bookmarks



Who is online

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