1/* Mersenne Twister pseudo-random number generator defines.
2
3Copyright 2002, 2003 Free Software Foundation, Inc.
4
5This file is part of the GNU MP Library.
6
7The GNU MP Library is free software; you can redistribute it and/or modify
8it under the terms of the GNU Lesser General Public License as published by
9the Free Software Foundation; either version 3 of the License, or (at your
10option) any later version.
11
12The GNU MP Library is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
15License for more details.
16
17You should have received a copy of the GNU Lesser General Public License
18along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
19
20
21/* Number of extractions used to warm the buffer up.  */
22#define WARM_UP 2000
23
24/* Period parameters.  */
25#define N 624
26#define M 397
27#define MATRIX_A 0x9908B0DF   /* Constant vector a.  */
28
29/* State structure for MT.  */
30typedef struct
31{
32  gmp_uint_least32_t mt[N];    /* State array.  */
33  int mti;                     /* Index of current value.  */
34} gmp_rand_mt_struct;
35
36
37void __gmp_mt_recalc_buffer __GMP_PROTO ((gmp_uint_least32_t *));
38void __gmp_randget_mt __GMP_PROTO ((gmp_randstate_t, mp_ptr, unsigned long int));
39void __gmp_randclear_mt __GMP_PROTO ((gmp_randstate_t rstate));
40void __gmp_randiset_mt __GMP_PROTO ((gmp_randstate_ptr, gmp_randstate_srcptr));
41