Registered Member
|
Hi,
I would like to know whether it is possible to initialize an Eigen Vector/Array from a continuous memory block without copying data. Something like:
I have not found anything in the documentation about this. Thank you for any answer, Tobi |
Registered Member
|
I believe you want:
|
Registered Member
|
Thanks for the answer. This seems to be what I am looking for. But can I compute with the map as it would be a VectorXd? Or are there restrictions. For instance can I add a VectorXd and a Map yielding a VectorXd?
Tobi |
Registered Member
|
I'm fairly new to Eigen, but I believe that is the purpose of Maps.
|
Moderator
|
Manhigh is right. The only practical difference is that you cannot resize a Map object since it does not hold the underlying memory.
|
Registered Member
|
Thanks a lot for your answers. This is exactly what I was looking for. By the way, I am quite impressed by Eigen. Great work
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]