I am looking for a random number generator which always returns the same random number for a given integer key.
For example:
KeyBasedRandomGenerator r = new KeyBasedRandomGenerator(MY_SEED);
for (int i = 0; i < 10000000; ++i)
{
assert ( r.Get(i) == r.Get(i));
}
Is there an implementation of such systems in C# or C++? What are they called?
Is it possible to find variations which always return the same result for a range:
assert ( r.Get(0, 15, i) == r.Get(0, 15, i));
Aucun commentaire:
Enregistrer un commentaire