Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
8123:eb2beef9a9ff | 8124:d227d096d49e |
---|---|
464 oct_init_by_entropy (); | 464 oct_init_by_entropy (); |
465 | 465 |
466 ColumnVector s = get_internal_state (); | 466 ColumnVector s = get_internal_state (); |
467 | 467 |
468 rand_states[uniform_dist] = s; | 468 rand_states[uniform_dist] = s; |
469 | |
470 oct_init_by_entropy (); | |
471 s = get_internal_state (); | |
469 rand_states[normal_dist] = s; | 472 rand_states[normal_dist] = s; |
473 | |
474 oct_init_by_entropy (); | |
475 s = get_internal_state (); | |
470 rand_states[expon_dist] = s; | 476 rand_states[expon_dist] = s; |
477 | |
478 oct_init_by_entropy (); | |
479 s = get_internal_state (); | |
471 rand_states[poisson_dist] = s; | 480 rand_states[poisson_dist] = s; |
481 | |
482 oct_init_by_entropy (); | |
483 s = get_internal_state (); | |
472 rand_states[gamma_dist] = s; | 484 rand_states[gamma_dist] = s; |
473 } | 485 } |
474 | 486 |
475 ColumnVector | 487 ColumnVector |
476 octave_rand::get_internal_state (void) | 488 octave_rand::get_internal_state (void) |