michael...@gmail.com
unread,Jan 26, 2016, 4:14:24 PM1/26/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jStat
Greetings all...
I'm working on some discrete simulation prototypes and have a question regarding the isolation of random number generation states.
From looking at `distribution.js` and `jstat.js`, most calls use the built-in `Math.random` function. While this can be overridden at the global level (yuck!) with another RNG (to support seeding, etc.), it still refers to a singular RNG, and assumes it's the same RNG for all use cases.
However, I'm wondering if any work/thought has been given to partitioning/isolating RNG state? In the simulation case, I have several input variables that each need to have an isolated random number stream generated regardless of how many other variables may have been sampled.
For example, assume 2 input variables 'X' (Normal) and 'Y' (Poisson). If I repeatedly alternate between sampling 'X' and 'Y' over 100 samples, I get a specific stream of numbers for each variable. The problem is that today, if I remove 'Y', the number stream generated for 'X' is no longer the same (due to the internal state of the RNG not being mutated for calls to 'Y').
Any pointers / thoughts / comments welcome.