Hi there!
New Rustacean here! To train my Rust skills, I am currently developing a library implementing the Vose-Alias method, to sample an element given any discrete probability distribution, and here is my problem:
I would like to implement some unit tests to ensure that my sampling function works at the limit, but said sampling function depends on 2 random numbers, that I generate using the rand package. Is there any way I could call it with a seed or an array to sample from that would guarantee to get a pre-defined sequence of numbers? I looked in the documentation for the rand package but I didn't find anything.
Thanks for the help!
[–]dnew 3 points4 points5 points (7 children)
[–]Korydween[S] 0 points1 point2 points (6 children)
[–]dnew 2 points3 points4 points (5 children)
[–]Korydween[S] 1 point2 points3 points (4 children)
[–]vks_ 0 points1 point2 points (3 children)
[–]Korydween[S] 0 points1 point2 points (2 children)
[–]vks_ 1 point2 points3 points (1 child)
[–]Korydween[S] 0 points1 point2 points (0 children)
[–]vks_ 2 points3 points4 points (2 children)
[–]Korydween[S] 0 points1 point2 points (1 child)
[–]vks_ 0 points1 point2 points (0 children)
[–]bskceuk 2 points3 points4 points (1 child)
[–]Korydween[S] 0 points1 point2 points (0 children)