I need to be able to save/load state of this boost random generator:
boost::variate_generator<boost::mt19937, boost::random::uniform_real_distribution<> > generator;
I do it this way:
std::ostringstream content;
content << this->generator.engine();
The problem is, that this is incredibly slow, isn't there some alternative way to store it? (Or access the random generator data in native format). This code is encapsulated in our RandomGenerator
class, so it can be little bit nasty.