Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc.

[ Thread Index | Date Index | More Archives ]

On 5 Jan 2017, at 12:06, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

Finally, these examples also reveal that the "_expression_-based" API outperforms all other alternatives, in all cases. 

moreover, that api looks much more composable than alternatives; for example, one could overload && || to mean
disjunction and union resp., to write things like

A( 5 <= iota <= 9 && iota*2+1 ) // all odd numbers between 5 and 9

this improves decoupling of subexpressions in a meaningful way ( at the cost of more metaprogramming to translate common
forms into the underlying optimal ’slicing’ logic ).

as a side note, concerning ic<N> and friends, why not using something ala std::placeholders: ?

iota * _2 + _1

( sorry if it has already been suggested :) )

Mail converted by MHonArc 2.6.19+