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

Triangular matrix inverse

Tags: None
(comma "," separated)
ansar
Registered Member
Posts
15
Karma
0

Triangular matrix inverse

Mon Jul 27, 2015 10:58 am
Currently calling .inverse() on a triangular matrix. How do I speed the inverse up using Eigen TriangularView? Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Triangular matrix inverse

Mon Jul 27, 2015 11:13 am
To solver Ax=b, with A triangular do:

x = A.triangularView<Lower>().solve(b);
ansar
Registered Member
Posts
15
Karma
0

Re: Triangular matrix inverse

Mon Jul 27, 2015 11:30 am
I am interested in the inverse itself of A.traingularView<Lower> rather than a solve()
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Triangular matrix inverse

Mon Jul 27, 2015 8:21 pm
You can call solve on the identity matrix, but be sure that you really need the inverse explicitly as computing it is much more expensive than applying it and also prone to numerical issues.


Bookmarks



Who is online

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