阅读背景:

使用Random时是否应该避免使用种子?

来源:互联网 

When using System.Random in .NET and supplying it with a seed, are there some seeds that should be avoided? I am asking because I like to inject a known seed when running simulation-like computations, so that I can replicate results later if needed. However, the function underlying a random number generator is periodical, the period depending on the seed, so I would like to know if there are caveats with the specific System.Random implementation, and, as a bonus, if anyone knows what function it uses behind the covers. When using System.Random in .NET and supplying




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: