Registered Member
|
What is the most efficient way to add a constant number to all the elements of a vector in Eigen?
One obvious way is to use a for loop. The other option is to do
Is there a better way? |
Moderator
|
you have to move to array world:
myvector.array() + myconstant |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]