Re: [eigen] Euler-angles and partial reductions API design

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


On Thursday 17 July 2008 15:11:03 Gael Guennebaud wrote:
> For the second point I'll try to be more concise ;), so what about the
> partial-redux proposal which is on the Todo page, section Array
> module:
> http://eigen.tuxfamily.org/index.php?title=Todo#Array_module
>
> The idea to make partial-reduction usable by adding .columnWise() and
> .rowWise() members to MatrixBase giving access to partial-reduction
> shortcuts.

Sounds like a very good idea. We have to choose one and for all between "col" 
and "column" though. How about colWise() ?

> I suggested columnWise/rowWise because I think they are much less
> ambiguous than "horizontal/vertical reduction".

Agree.

> Also, the current templated functions verticalRedux/horizontalRedux
> would be moved to the generic "PartialRedux proxy", and named "redux":
>   m.columnWise().redux(myfunctor());

excellent.

> Even shorter, what about an automatic cast to scalar operator for 1x1
> fixed size matrix ? I see 2 use cases:
> - you can write: float a = vector1.transpose() * vector2;
> - you can write generic multimensionnal algorithms without the the
> pain of writing [0] for the 1D case.
> In practice the cast operator would be protected by a static assert.

Good idea.

Cheers,
Benoit

Attachment: signature.asc
Description: This is a digitally signed message part.



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