This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generateRandomVector(std::vector<int>& inputVector, const std::pair<int,int> RAND_BOUNDS, const int VEC_SIZE) { | |
std::random_device rnd_device; | |
std::mt19937 mersenne_engine{rnd_device()}; | |
std::uniform_int_distribution<int> distribution {RAND_BOUNDS.first, RAND_BOUNDS.second}; | |
auto generator = [&distribution, &mersenne_engine]() { | |
return distribution(mersenne_engine); | |
}; |