|Re: [eigen] Qt's container support|
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
|On Tuesday 20 January 2009, Gael Guennebaud wrote:|
> The last issue I found is with QVector::fill(const T&,size_t) which is
> the equivalent of std::vector<T>::resize(size_t,T). Here the argument
> is passed by reference so no alignment issue. The problem is the use
> of the default ctor and operator= to initialize/copy the new elements
> while our operator= does not allow to set an uninitialized matrix.
> a) allow operator= to set/resize an uninitialized matrix
> b) specialize QVector for Eigen's matrix type using a similar trick
> than for std::vector such that we only have to redefine the fill()
> method to use Matrix::set()
> c) do nothing and enforce the user to use .resize() followed by a for
> loop instead of fill().
> I vote for solution b)
> any opinion ?
b) isn't a trick, it's the C++ solution for this kind of problem :) ( c) is not an acceptable solution ).
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|