Re: [eigen] A vector indexed by another vector

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


This has been requested several times, essentially this is directly what bug 329 wants to have:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=329
There is a prototype implementation, I'm not sure how well it worked/works with the current Eigen version.

If, however, the offset array is a permutation, i.e. each index occurs exactly once, you should be able to solve it using:
http://eigen.tuxfamily.org/dox-devel/classEigen_1_1PermutationMatrix.html

Thanks for the pointers. Unfortunately, I know that there are indices that will not be used. We do skip some values depending on a parameter at the beginning of the process, so perhaps duplicating data would be an acceptable solution (although a memory- and time-costly one, there are dozens of arrays that may or may not be needed).

Matthieu
--
Information System Engineer, Ph.D.
Blog: http://matt..eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
Music band: http://liliejay.com/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/