hmmer-3.3/easel/esl_random.c
/* mersenne_seed_table()
 * Initialize the state of the RNG from a seed, using a Knuth LCG.
 * 
 * TODO: In January 2002, Nishimura and Matsumoto replaced this with a
 * better initialization. (Why did I use their ~1999 initialization
 * when I adapted MT in June 2009?) They say that the problem with
 * this version is that the seed's most significant bit has little
 * effect on the MT state vector. Upgrading this will require effort
 * though: any change to the output of our RNG will break numerous
 * unit tests and regressions that use fixed RNG seeds to get
 * reproducible streams.
 */
mersenne_seed_table()
Initialize the state of the RNG from a seed, using a Knuth LCG.

In January 2002, Nishimura and Matsumoto replaced this with a
better initialization. (Why did I use their ~1999 initialization
when I adapted MT in June 2009?) They say that the problem with
this version is that the seed's most significant bit has little
effect on the MT state vector. Upgrading this will require effort
though: any change to the output of our RNG will break numerous
unit tests and regressions that use fixed RNG seeds to get
reproducible streams.
mersenne_seed_table () Initialize the state of the RNG from a seed using a Knuth LCG . In January 2002 Nishimura and Matsumoto replaced this with a better initialization . ( Why did I use their ~1999 initialization when I adapted MT in June 2009? ) They say that the problem with this version is that the seed ' s most significant bit has little effect on the MT state vector . Upgrading this will require effort though : any change to the output of our RNG will break numerous unit tests and regressions that use fixed RNG seeds to get reproducible streams .
static void
mersenne_seed_table(ESL_RANDOMNESS *r, uint32_t seed)
{
  int z;
  r->seed  = seed;
  r->mt[0] = seed;
  for (z = 1; z < 624; z++)
    r->mt[z] = 69069 * r->mt[z-1];
  return;
}
static void mersenne_seed_table ( ESL_RANDOMNESS * r , uint32_t seed ) { int z ; r -> seed = seed ; r -> mt [ 0 ] = seed ; for ( z = 1 ; z < 624 ; z ++ ) r -> mt [ z ] = 69069 * r -> mt [ z - 1 ] ; return ; }
mersenne_seed_table()
 Initialize the state of the RNG from a seed, using a Knuth LCG.
mersenne_seed_table () Initialize the state of the RNG from a seed using a Knuth LCG .