Hey Igor,
In response to your suggestion, I was about to modify 6!:2 more
generally, to make negative x mean 'return the list of individual times'
and then let you take whatever statistic you want from that. But
thinking again, it seems to me that it is easier for you to do this in
J, with a verb like
NB. x is # repetitions, y is sentence, result is list of times
times =: 4 : 'times =. $0 for. i. x do. times =. times , 6!:2 y end. times'
5 times 'i. 10000'
1.4359e_5 5.33333e_6 4.92307e_6 4.92307e_6 5.33333e_6
You could pass the result of times into the statistics verb, or
alternatively you could make an adverb
NB. x is # repetitions, y is sentence, result is list of times
timestat =: 1 : 0
:
times =. $0
for. i. xdo. times =. times , 6!:2 y end.
u times
)
5 mean timestat 'i. 10000'
9.43589e_6
That gets what you want, right?
Henry Rich
---
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm