c-cube / iter

Simple iterator abstract datatype, intended to iterate efficiently on collections while performing some transformations.
https://c-cube.github.io/iter
BSD 2-Clause "Simplified" License
118 stars 11 forks source link

Various functions #9

Closed Drup closed 8 years ago

Drup commented 8 years ago

The implementation of shuffle is not great, but for perfect shuffle, I don't see any other solution. There is a nice algorithm for lazy (or weighted) sampling, but it needs a heap.