adolgert / CompetingClocks.jl

Simplest simulation to use non-Exponential transitions
MIT License
5 stars 0 forks source link

Feature/common random manyrun #56

Closed adolgert closed 6 months ago

adolgert commented 6 months ago

The CommonRandomNumber struct wasn't conceptually sound. This time, it's set up so that you:

  1. Run the simulation many times to record random number generator states.
  2. Then use those stored values to run subsequent measurements.

Before, it assumed, quite incorrectly, that you would run the simulation once, record values, and move on. The change in the code isn't big. I added a reset! method to tell the CRN that we are starting a fresh run of the simulation. That's it. But it becomes a reset! method on every sampler, so I added it to the sampler interface. And added more testing, especially for the keyed prefix sum.