[PATCH] Implement std::experimental::sample

Evgeniy Stepanov eugenis at google.com
Mon Apr 27 17:52:39 PDT 2015


I should have read the entire document. Sorry about that, will fix soon.


On Mon, Apr 27, 2015 at 4:34 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
> I'm very confused here.
>
> The LFTS document references N3925 as the source of the `sample` proposal.
>
> That paper has sample code, and talks about both "reservoir sampling" and "selection sampling", and using one for random access iterators and the other for forward iterators, and includes a reference implementation.  This code looks nothing like that.
>
> I also don't see any tests that deal with:
>
> 1. Stability  "Stable if and only if PopulationIterator meets the requirements of a ForwardIterator type."
> 2. Empty input ranges.  (should write nothing)
> 3. test for n == 0 (should write nothing)
> 4. No tests with different kinds of iterators.
>
>
>
>
> http://reviews.llvm.org/D9044
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>



More information about the cfe-commits mailing list