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

[ Thread Index | Date Index | More 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:
> 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".


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


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


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

Mail converted by MHonArc 2.6.19+