#Randomly take samples from a list , respecting some distribution
5 messages · Page 1 of 1 (latest)
- can items be taken multiple times = can there be duplicates in the output? (I'd guess no)
- "sublist" is a commonly found function in programming, so do you mean a continuous section? (I'd guess no)
got something working
template <std::ranges::random_access_range R, std::ranges::random_access_range W, std::weakly_incrementable O,
https://github.com/Chlorie/clu/blob/2c935e8538422f3be9a869b9a073a074231bf927/lib/include/clu/random.h#L96-L140
OK I put my implementation here. Not yet thoroughly tested though.