Mercurial > hg > octave-lojdl
changeset 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 | eb2beef9a9ff |
children | 4fce6da228c6 |
files | liboctave/ChangeLog liboctave/oct-rand.cc |
diffstat | 2 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Brian Gough <bjg@gnu.org> + + * oct-rand.cc (initialize_mersenne_twister): Use separate + initializations for each generator to avoid correlation. + +2008-09-12 Jaroslav Hajek <highegg@gmail.com> + + * oct-inttypes.h (pow (const octave_int<T>&, const octave_int<T>&)): + 2008-09-19 John W. Eaton <jwe@octave.org> * Array.cc (assign1, assign2, assignN):
--- 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; }