eigenmvn icon indicating copy to clipboard operation
eigenmvn copied to clipboard

static random-number generator 'defeated' by seed in constructor

Open mmurrian opened this issue 2 years ago • 5 comments

Every construction of an EigenMultivariateNormal instance re-seeds the static random-number generator. This will cause all instances to reset their RNG sequence back to the same output whenever a new EigenMultivariateNormal is created. If samples() is only called once per instance, the output is always the same!

I recommend providing a static setSeed(...) function that the user can explicitly call and not setting the seed in the constructor.

mmurrian avatar Nov 16 '21 14:11 mmurrian