pub unsafe extern "C" fn seedQuEST(
env: *mut QuESTEnv,
seedArray: *mut c_ulong,
numSeeds: c_int,
)Expand description
Seeds the random number generator with a custom array of key(s), overriding the default keys.
This determines the sequence of outcomes in functions like measure() and measureWithStats().
In distributed mode, the key(s) passed to the master node will be broadcast to all other nodes, such that every node generates the same sequence of pseudorandom numbers.
This function will copy the contents of \p seedArray into a permanent array
env.seeds, so \p seedArray is afterward safe to free.
QuEST uses the Mersenne Twister for random number generation.
@see
- Use seedQuESTDefault() to seed via the current timestamp and process id.
- Use getQuESTSeeds() to obtain the seeds currently being used for RNG.
@ingroup debug @param[in] env a pointer to the ::QuESTEnv runtime environment @param[in] seedArray Array of integers to use as seed. This allows the MT to be initialised with more than a 32-bit integer if required @param[in] numSeeds Length of seedArray @author Ania Brown @author Tyson Jones (doc)