Random Engine Differences

前端 未结 7 1417
灰色年华
灰色年华 2020-12-13 02:06

The C++11 standard specifies a number of different engines for random number generation: linear_congruential_engine, mersenne_twister_engine,

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 02:14

    As the other answers forget about ranlux, here is a small note by an AMD developer that recently ported it to OpenCL:

    https://community.amd.com/thread/139236

    RANLUX is also one of very few (the only one I know of actually) PRNGs that has a underlying theory explaining why it generates "random" numbers, and why they are good. Indeed, if the theory is correct (and I don't know of anyone who has disputed it), RANLUX at the highest luxury level produces completely decorrelated numbers down to the last bit, with no long-range correlations as long as we stay well below the period (10^171). Most other generators can say very little about their quality (like Mersenne Twister, KISS etc.) They must rely on passing statistical tests.

    Physicists at CERN are fan of this PRNG. 'nuff said.

提交回复
热议问题