Welcome to mirror list, hosted at ThFree Co, Russian Federation.

random.hpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 267ae22add25cb40f9a6dc8681275b9dde0cfd44 (plain)
1
2
3
4
5
6
7
8
9
10
#pragma once

#include <random>
#include <vector>

namespace base
{
// Selects a fair random subset of size min(|n|, |k|) from [0, 1, 2, ..., n - 1].
std::vector<size_t> RandomSample(size_t n, size_t k, std::minstd_rand & rng);
}  // base