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

A more efficient way to calculate A * A.transpose()?

Tags: None
(comma "," separated)
jianyang
Registered Member
Posts
1
Karma
0
Is there a more efficient way to calculate A * A.transpose(), where A is a Eigen matrix?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You can use a SelfAdjointView to compute only half of the product. This will provide gain only if A is not too small:

res.setZero(n,n);
res.selfadjointView<Lower>.rankUpdate(A);

This will compute only the lower half. This is enough for solving with Cholesky or applying products trough the selfadjointView. To get a full matrix:

res.triangularView<StrictUpper>() = res.adjoint().triangularView<StrictUpper>();


Bookmarks



Who is online

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