boost-random Questions
2
Consider this function compiling with g++ -std=c++11 (GCC 4.7.2):
boost::uuids::uuid getID()
{
static boost::uuids::random_generator generator;
return generator();
}
Is it safe to call getID f...
Wisdom asked 19/9, 2013 at 8:59
3
Solved
I need a "random" number generator, which produces the same result for a given seed on Windows, Mac, Linux, iOS and Android. Now I tried std::rand and boost::random_int_generator with boost::mt1993...
Tupelo asked 4/6, 2015 at 16:33
3
Solved
I've written a simulation in C++ that generates (1,000,000)^2 numbers from a specific probability distribution and then does something with them. So far I've used Exponential, Normal, Gamma, Unifor...
Solange asked 27/4, 2012 at 21:23
4
Solved
I have a program that uses the mt19937 random number generator from boost::random. I need to do a random_shuffle and want the random numbers generated for this to be from this shared state so that ...
Retina asked 29/9, 2008 at 3:24
1
There seems to be some mythology around the use of mt19937, specifically that once seeded 'some' number of bits produced by the generator should be ignored so as to have only as near as is possible...
Discriminating asked 29/10, 2012 at 1:20
1
Solved
I would like to initialize boost::random::discrete_distribution with an std::vector<double>.
My problem is that if I initialize it with an array, like in the official example:
double proba...
Vandyke asked 26/10, 2011 at 14:28
2
Solved
I'm trying to generate a random 64bit unsigned integer using boost random,
but I'm getting an assertion failure with uniform_int.
struct timeval tv;
boost::mt19937 randGen(tval.tv_usec);
boost::un...
Dicho asked 16/8, 2010 at 3:47
2
Solved
I'm using the boost mt19937 implementation for a simulation.
The simulation needs to be reproducible, and that means storing and potentially reusing the RNG seeds later. I'm using the windows cryp...
Inhale asked 26/5, 2010 at 16:40
1
© 2022 - 2024 — McMap. All rights reserved.