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

Inverse symmetric matrix

Tags: None
(comma "," separated)
Akkawe
Registered Member
Posts
35
Karma
0
OS

Inverse symmetric matrix

Wed Jan 18, 2012 10:43 pm
If I had a symmetric dense matrix in which I store only the upper triangular part, Could I call the inverse method taking in account of its symmetry ?

example:
Code: Select all
MatrixXcd A= MatrixXcd::Zero(dimMatr,dimMatr);
for ......      
//.....         
A.block<3,3>(row,column)=subFLEX; //filling of the triangular upper part of a dense matrix
.....
A.????.inverse()   

thanks
Akkawe
Registered Member
Posts
35
Karma
0
OS

Re: Inverse symmetric matrix

Tue Jan 24, 2012 5:01 pm
I edited a wrong old question
Could someone help me?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Inverse symmetric matrix  Topic is solved

Wed Jan 25, 2012 2:51 pm
It's usually not recommended to explicitly compute the inverse. If what you want is solving for Ax=b, or more generally doing A^-1 * B, you can do:

A.selfadjointView<Eigen::Upper>().llt().solve(B)

Set B to the identity to get the explicit inverse.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Inverse symmetric matrix

Wed Jan 25, 2012 2:53 pm
Note that for such a small matrix, this might not be faster than the general 3x3 inverse code which has a specialization for the 3x3 case.
Akkawe
Registered Member
Posts
35
Karma
0
OS

Re: Inverse symmetric matrix

Thu Jan 26, 2012 4:12 am
Ok,
thank you very much


Bookmarks



Who is online

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