OK, I implemented the use of precomputed values instead of random numbers 
for testing randomized algorithms (among other things) in this pull 
request: https://github.com/sympy/sympy/pull/1377
My current solution for the implementation is to use a dictionary in order 
to supply all the variables that are otherwise provided by RNG in the body 
of a function. You're welcome to take a look!

13 юни 2012, сряда, 16:58:02 UTC+3, Aleksandar Makelov написа:
>
> How does this work (and does it work) in sympy?
>
> A classical example is a Monte Carlo algorithm. Is there an accepted way 
> to test these in sympy? For one-sided Monte Carlo algorithms, we can easily 
> test one direction in a deterministic way, but this doesn't feel very 
> satisfactory.
>
> Another example is the algorithms outputting random group elements that 
> are supposed to be nearly uniformly distributed in the group. I can't think 
> of any way to test these except by asking if the returned value is an 
> element of the group. Again, not much fun.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/prJ65ShhrcUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to