[Issue 2898] New: Allow RandomCover to sample both w/ and w/o replacement.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 25 08:47:20 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2898
Summary: Allow RandomCover to sample both w/ and w/o replacement.
Product: D
Version: 2.029
Platform: PC
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: dsimcha at yahoo.com
Currently, RandomCover only allows sampling without replacement. I have
created a modified version, located at
http://dsource.org/projects/scrapple/browser/trunk/rangeextra/randomcover.d ,
that also allows sampling a random access range with replacement as an infinite
range. This is done by template overloading on w/ or w/o replacement.
This version of RandomCover also fixes bug 2865 and, in the w/o replacement
version, replaces the bool[] with a BitArray for better space efficiency.
--
More information about the Digitalmars-d-bugs
mailing list