Registered Member
|
Hi,
Trying to sum a matrix and a vector.asDiagonal() does not compile, e.g.:
gives the following error:
However, the following will compile:
Am I doing something wrong here? Thanks, Bruno
Last edited by bdamas on Tue Jul 05, 2011 11:54 am, edited 1 time in total.
|
Moderator
|
that's the intended behavior. the reason is that the expression "B = A + x.asDiagonal();" should be optimally evaluated as you did, i.e., in two steps. In Eigen 3.1 we'll be able to do so automatically in a general fashion, but currently you have to do this yourself.
|
Registered Member
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]