Is there a cleaner way to write this or is this a reasonable implementation?
runsumpct =: 3 : 0
sorted=: \:~ y
vals =: (+/\ % +/) sorted
(sorted i. y) { vals
)
runsumpct 1 100 5 10
1 0.862069 0.991379 0.948276
I'm interested if there's a cleaner approach to sorting, operating, and
then returning the result in the original order.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
