c++ - How to efficiently multiply a vector by a transposed sparse matrix in Eigen? - Stack Overflow

I have with a sparse matrix A and a vector x in Eigen, and I need to perform the following transposed m

I have with a sparse matrix A and a vector x in Eigen, and I need to perform the following transposed matrix × matrix × vector operation: ATAx. This can be decomposed into two matrix-vector multiplications: y=Ax followed by ATy. The first one is simple, but I don't know how to do the second one without the explicit construction of AT. I can write something as:

y = A.transpose() * A * x;

However, it seems that A.transpose() explicitly constructs AT in memory, which would not be efficient for large matrices.

Another option might be to work with a sparse ATA, but in our case, this is a much more dense matrix than A itself.

Question: Is there any way how to multiply a vector by a transposed sparse matrix in Eigen without explicit construction of AT or ATA?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744662714a4586558.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信