You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, there is not a good way to seed query language functions like randomGaussian() or randomInt() in a way that's thread-safe and efficient. This may take some real investigation.
The text was updated successfully, but these errors were encountered:
A seeded PRNG is by its nature stateful; thus, there is no way to have a static function do what you want w/ a seeded PRNG (with the intention being some sort of reproducible PRNG associated with that specific query). If you need a seeded PRNG, the user will need some way to create that state and then reference it from the query.
An approach that might satisfy your needs, but isn't a PRNG, is some sort of mixing or hashing function based on a state (which we can assume to be the internals of the PRNG):
table.view(["X = mix_or_hash(my_seed ^ ii)"])
Depending on the quality of the hash, this may be a reasonable proxy for a PRNG. Utilities based on this hash could be built out:
table.view(["X = stateRandomInt(my_seed ^ ii, 0, 5)", "Y = stateRandomGuassian(my_seed ^ ii)"])
At the moment, there is not a good way to seed query language functions like
randomGaussian()
orrandomInt()
in a way that's thread-safe and efficient. This may take some real investigation.The text was updated successfully, but these errors were encountered: