#Randomly take samples from a list , respecting some distribution

5 messages · Page 1 of 1 (latest)

stable stream
#

efficiently do randomly take samples from a list to form a sublist according to some distribution function (distinct)

say p(x)=T*exp(-x/T) where T is a constant and p(x) is the probability density function

take 500 from 550 items

dense dagger
#
  • 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)
cosmic sun
#

got something working

cold narwhalBOT
#
template <std::ranges::random_access_range R, std::ranges::random_access_range W, std::weakly_incrementable O,
cosmic sun