Should RNG_BEGIN
and RNG_END
be put around every function call that call other functions that use randomness?
So if A calls B and B calls C and C calls RNG_INTEGER, should A have
RNG_BEGIN();
B();
RNG_END();
and B have
RNG_BEGIN();
C();
RNG_END();
and then C
RNG_BEGIN();
RND_INTEGER(0, n);
RNG_END();
?
That seems what happens in practice sometimes, but at least for the non-R definitions of RNG_BEGIN
and RNG_END
this doesn’t seem to be necessary.