Re: [eigen] What's the best way to copy an Eigen::Vector into a std::vector?

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


Hi

Quoting Robert Lupton the Good <rhl@xxxxxxxxxxxxxxxxxxx>:

> How painful would it to be to support .begin() and .end() to return 
> 
> &evec[0] and &evec[0] + evec.size()?  It is the STL way...

Rather painful, I'm afraid. Mostly as there already is an "end()"
function with different semantics.
Also be aware that the two vector notions are completely different.
While one is a container used to store arbitrary objects, the other is a
mathematical entity. Having iterators over the latter doesn't feel very
natural to me. (The same way I'm not asking for a scalar multiplication
operator for std::vector)
But, as others wrote, if you really want them you can still have them if
you use pointers to the data.

Markus




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