Registered Member
|
Hi,
I'm wondering why the following expression doesn't work for eigen:
while in the examples is possible to compute the sum simply as
I would like to set the diagonal elements of a matrix to zero, is it possible via Eigen API without an explicit loop? |
Registered Member
|
The following variant works:
Your code, in which the size is specified, is not accepted because one cannot resize A.diagonal() . This is perhaps rather inconsistent in that we do allow "Vector3d v; v.setZero(3);" even though v is fixed size. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]