VoiceOfUnreason
Deity
- Joined
- Dec 5, 2005
- Messages
- 3,663
Yeah it's an LCG alright.
EDIT: That method returns an integer in the range 0 .. (usNum-1) by the way, and m_ulRandomSeed will be an unsigned long member variable of the class CvRandom.
It's essentially the LCG taken straight out of Plauger's "The Standard C Library". If they had read Teukolsky et al, they might have made another choice, but I suspect that in practice, the standard RNG is "good enough".
Of course, it has the usual off by one distributions when attempting to choose uniformly among possibilities that do not evenly divide the space, but so it goes.