Mercurial > hg > octave-lyh
diff liboctave/oct-rand.cc @ 8124:d227d096d49e
oct-rand.cc (initialize_mersenne_twister): use separate initializations for each generator
author | Brian Gough |
---|---|
date | Mon, 22 Sep 2008 13:17:39 -0400 |
parents | a2950622f070 |
children | 25bc2d31e1bf |
line wrap: on
line diff
--- a/liboctave/oct-rand.cc +++ b/liboctave/oct-rand.cc @@ -466,9 +466,21 @@ ColumnVector s = get_internal_state (); rand_states[uniform_dist] = s; + + oct_init_by_entropy (); + s = get_internal_state (); rand_states[normal_dist] = s; + + oct_init_by_entropy (); + s = get_internal_state (); rand_states[expon_dist] = s; + + oct_init_by_entropy (); + s = get_internal_state (); rand_states[poisson_dist] = s; + + oct_init_by_entropy (); + s = get_internal_state (); rand_states[gamma_dist] = s; }