Open b051 opened 10 years ago
actually, I was hoping to get the Nth genrand_int32() after giving a seed, like,
m.init_genrand(saved_seed)
[0...N-1].forEach (n) -> m.genrand_int32()
expected = m.genrand_int32()
the reason is, so I can save the state of mt and continue next time.
I didn't read this C code carefully: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/index.html, but someone referred it on stackoverflow when I search "Mersenne Twist Jump".
What do you expect "Jump Ahead" to do? If I call "jumpAhead(10000)" what would the effect be, and what would the runtime be? Why is it better to have this method in the implementation, than just asking for 10000 bytes and throwing them away?