Registered Member
|
Hi,
I have some code that works using std::valarray and I would like to try replacing std::valarray with Eigen::Array. I am hitting a problem with assignment from a scalar which seems to be possible with valarray but not Array. For example, the following works:
Whereas the following generates an error for me:
Is there some easy way to make this work without changing the assignment statement? If not, I would be happy to try and patch in this behaviour but I would really appreciate it if someone could give me some pointers on where to start. Also, if I were to patch in such behaviour would this potentially be a useful addition to the Array class? |
Moderator
|
the best is to patch the class ArrayBase in src/Core/ArrayBase.h to add an overload of operator= for Scalar that would simply call derived().fill(value) and send the path on the bugzilla: http://eigen.tuxfamily.org/bz/ so that other developers can comment on this addition.
|
Registered Member
|
Thanks, the advice is appreciated. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]