#include <shuffledrand.h>
Collaboration diagram for ShuffledRandom< T >:
Used e.g. in generating inputs to avoid potential artifacts. Returns value in open-ended range [0.0, 1.0).
There is technically no reason why this routine would need to be a template, since only type double and (possibly) float are likely to be useful. (It relies on drand48, which uses only 48 bits and thus wouldn't be sufficient for a 64-bit type.) However, the Cray T3E compiler (as of PE3.2) got confused in certain obscure cases when this routine was coded as a regular function in a .c file.
Definition at line 36 of file shuffledrand.h.
Static Public Methods | |
void | reset () |
Optional; may be called to reset the internal state. | |
T | next () |
Returns the next number in the series. | |
T | plain_rand () |
Simple random value 0..1.0, on which shuffledrandom is built. | |
void | plain_rand_seed (long int seedval) |
Set seed for plain_rand(). | |
Static Public Attributes | |
int | default_seed = 87654321 |
Default seed for shuffled_reset. |