[eigen] User defined reductions

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


In the documentation for Eigen 3.1, Tutorial page 7 on Reductions
makes a brief mention of user defined reductions and suggests looking
at the DenseBase::redux() function.

My immediate goal is to determine the column-wise medians of an array.
 It would be convenient if I could write it as

 A.colwise().median()

but I suspect that won't be possible because the median cannot be
calculated sequentially and it appears that redux implies, well, a
reduction in the sense of MapReduce.  (Evaluating the median requires
at least a partial sort of the vector.)

I can write the calculation in a loop over the columns - I just wanted
to confirm that there was not a more compact way of expressing this.



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