Re: [eigen] Zero-Sized Blocks

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


If this is already allowed for Matrix<> objects, then I don't see why
this would not be the case for blocks.  It would be nice that the
block.cpp unit test checks for 0-sized blocks.

gael

On Mon, May 13, 2013 at 4:56 PM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> is it intended that fixed sized blocks can't have 0 rows or 0 columns (while
> dynamic-sized can)?
> It's hard to explain a useful use-case without much context, but it allows
> me to reduce code-duplication (resulting essentially in a NOP for the 0
> case).
> The fix is actually just to relax an assertion in Block.h
>
> I don't see anything that could go wrong with that (and in other places
> fixed size 0 is allowed, e.g. Matrix<double, 0, 1>), but I don't dare to
> commit that without asking first.
>
> Christoph
>
>
> --
> ----------------------------------------------
> Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
> Cartesium 0.049
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: +49 (421) 218-64252
> ----------------------------------------------
>
>



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