Registered Member
|
Hello,
I'm trying to modify diagonal values of Sparse Matrix:
What is the way to add constant Scalar to all diagonal values? If some diagonal values are missing it should be added and set to Scalar. |
Moderator
|
This should work:
AtA.diagonal().array() += constant; |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft