I want to sample without replacement a range but I don't want to materialize all the samples in memory. In other words I want to first get the minimum sample, given that and the number of remaining samples to get the next one etc.
Fundamentally I want a function with the following signature.
int next_sample(int prev_sample, int upper_bound, int remaining_samples);
Aucun commentaire:
Enregistrer un commentaire