Re: [eigen] Partially fixed size matrices.

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


2009/6/11 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> 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.

Hm, no strong opinion either. On the one hand it can be convenient /
expected by the user. On the other hand it means that the semantics
depend on which size is fixed and which is dynamic. We already do that
for vectors / rowvectors, though.

I'd say 'yes' but it's only a 51% majority among my neurons...

>> 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...

Yes, the doc is inseparable from the source code otherwise it would be
unmanageable to keep it in sync.
Meanwhile the best possibilities to have for commenting are:
1) open issues on the tracker
or
2) fork our hg repository and add your comments/changes into the
documentation in the source code. then ask us to pull your
improvements.

Benoit



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