Anonymous user
Verify distribution uniformity/Naive: Difference between revisions
Verify distribution uniformity/Naive (view source)
Revision as of 23:46, 15 March 2014
, 10 years agoUpdated D entry
m (Added missing function) |
(Updated D entry) |
||
Line 334:
if (isCallable!TF) {
int[int] counts;
foreach (immutable i; 0 .. nRepeats)
counts[func()]++;
immutable double target = nRepeats /
immutable int deltaCount = cast(int)(delta / 100.0 * target);
Line 347:
foreach (k; counts.keys.sort())
writeln(k, " ", counts[k]);
writeln
}
|