Verify distribution uniformity/Naive: Difference between revisions

Updated 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 / cast(double)(counts.length);
immutable int deltaCount = cast(int)(delta / 100.0 * target);
 
Line 347:
foreach (k; counts.keys.sort())
writeln(k, " ", counts[k]);
writeln();
}