c++ - How do I save the state of std::mersenne_twister_engine to restore it later? -


i save state of std::mersenne_twister_engine can restore @ later time. know can save original seed , call discard roll engine forward number of steps, requires knowledge of number of times engine advanced, not mention discard seems inefficient (o(n)) way roll engine forward.

how go saving off exact state of engine?

according this, engine should support serialization , standard stream.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -