Re: [eigen] Partially fixed size matrices.

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


On Thu, Jun 11, 2009 at 1:19 PM, Tim Hutt<tdhutt@xxxxxxxxx> wrote:
> Hi,
>
> One of the examples given in the documentation says that you can do
> things like this:
>
> Eigen::Matrix<double, Dynamic, 1> foo(10); // A 10x1 matrix (ie a vector)
>
> However, it makes no mention of if you can do this:
>
> Eigen::Matrix<double, Dynamic, 2> bar(???); // An Nx2 matrix.

of course you can do that, and this is even recommended because this
allows Eigen to unroll some inner loops.

> And none of the constructors seem appropriate for a matrix like this.
> The single argument one is the only one that really makes sense and it
> says it is only for vectors.

Indeed, you have to specify both sizes even though one is already
known and cannot be changed. Perhaps we could allow the "vector" ctor
to work in that case too ? Right know I don't have a strong opinion.

> Also looking in the source code there are
> several lines with things like
>
> if (compile_time_columns == 1 ...

Don't worry, this is just because some features are only for vectors,
and/or optimized for vectors.

> which makes me suspect that it only works for vectors. Either way the
> documentation really needs to be clarified.

got it.

> While on the topic of documentation it would be awesome if you could
> set up a way to append comments to the documentation pages. This can
> be very useful, e.g. the MySQL documentation has (or had, they seem to
> have changed it a bit) a lot of useful comments.

This is a good idea, however since we are using doxygen to generate
the doc this not going to be easy unless we extend doxygen itself !
Moreover, since the documentation evolves from one version to the
other, it is probably very tricky to be able to correctly propagate
the comments...

gael.

> Tim
>
>
>



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