Registered Member
|
I have a simple code:
which gives me following error. The default + operatuin, which I am asking for, is already defined by Eigen. Isn't it?
|
Moderator
|
I guess this is because the STL is not compatible with Expression templates. Anyway, a better way would be to use a Matrix<int,2,Dynamic> vec. and vec.rowwise().sum().
|
Moderator
|
oh, the fix is actually simple: Vector2i::Zero() is not a Vector2i, so it has to be evaluated as follow:
|
Registered Member
|
Thanks for the solution. I am also converteing my code to use Matrix<int,2,Dynamic> over stl containers since it offers more advantages.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]