[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calculations while sorting?
From: |
Ben Pfaff |
Subject: |
Re: Calculations while sorting? |
Date: |
Sun, 27 Jul 2008 21:21:56 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
John Darrington <address@hidden> writes:
> How feasible would it be to have sort_execute optionally calculate
> some simple linear statistics on the fly? eg: the sum of values in
> one column.
>
> If that could be done, then it would avoid the need for an extra pass
> through the data for many procedures.
It would be easy to create a "moments_reader" that does calculations
like this as side effects and otherwise passes cases through
without modification.
There would be no need to make this part of sorting. Just make a
"moments_reader" out of your data and then pass the
moments_reader to sort_execute.
--
Ben Pfaff
http://benpfaff.org