damar-wicaksono / uqtestfuns

A Python3 library of test functions from the uncertainty quantification community with a common interface for validation and benchmarking purposes.
https://uqtestfuns.readthedocs.io/en/latest/
MIT License
8 stars 0 forks source link

Add a method to reset seed number for `ProbInput` instance #264

Closed damar-wicaksono closed 1 year ago

damar-wicaksono commented 1 year ago

Because a ProbInput instance has an independent RNG that is created when the instance is created, we should include a way to reinitialize the random number generator so that we don't need to create a new ProbInput instance.

Possible interface:

>>> import uqtestfuns as uqtf
>>> prob_input = uqtf.ProbInput(marginals=[uqtf.UnivDist(distribution="normal", parameters=[0, 1])])
>>> prob_input.reset_rng(rng_seed=1345342)  # Reset the attached RNG with a given (optional) seed number
damar-wicaksono commented 1 year ago

This issue has been resolved by PR #280.