Re: [eigen] State of the problem with std::vector

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


2009/1/8 Keir Mierle <mierle@xxxxxxxxx>:
> A "non-solution" is to not use Vector4f. Instead use Matrix4Xf, which is
> fixed at 4 rows and X columns; each column is a different vector. I use this
> all the time in libmv to represent a collection of 4D vectors (homogeneous
> in my case). This is also handy for bulk transforms that take advantage of
> vectorization (i.e. by multiplying by a matrix).

This is perfect for users for whom this is an option, of course. But
it doesn't do all what std::vector does (insert...) and many users
simply have to use std::vector.

> On another note: Does eigen have shorthands for small numbers of rows /
> colums, but variable numbers for the other? i.e. 4 x n, or n x 4, etc?

Not for now.

> I
> have defines for Mat2X...Mat5X, MatX2...MatX5 in libmv for exactly this
> reason. Lots of convenience typedefs are great! Promotes mutual
> understanding for users of the library if they don't have to make their own
> different typedefs.

One has to find the right compromise between this, and the fact that
we already have a large number of typedefs and this proposal would
make it even much larger. Here before taking any decision what's
needed is a measurement of the impact on compilation time. If it's
costly one can still consider a separate header Eigen/MoreTypedefs.

Cheers,
Benoit

---


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