| 1 |
/* |
| 2 |
A C-program for MT19937, with initialization improved 2002/1/26. |
| 3 |
Coded by Takuji Nishimura and Makoto Matsumoto. |
| 4 |
|
| 5 |
Before using, initialize the state by using init_genrand(seed) |
| 6 |
or init_by_array(init_key, key_length). |
| 7 |
|
| 8 |
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, |
| 9 |
All rights reserved. |
| 10 |
|
| 11 |
Redistribution and use in source and binary forms, with or without |
| 12 |
modification, are permitted provided that the following conditions |
| 13 |
are met: |
| 14 |
|
| 15 |
1. Redistributions of source code must retain the above copyright |
| 16 |
notice, this list of conditions and the following disclaimer. |
| 17 |
|
| 18 |
2. Redistributions in binary form must reproduce the above copyright |
| 19 |
notice, this list of conditions and the following disclaimer in the |
| 20 |
documentation and/or other materials provided with the distribution. |
| 21 |
|
| 22 |
3. The names of its contributors may not be used to endorse or promote |
| 23 |
products derived from this software without specific prior written |
| 24 |
permission. |
| 25 |
|
| 26 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 27 |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 28 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 29 |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 30 |
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 31 |
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 32 |
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 33 |
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 34 |
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 35 |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 36 |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 37 |
|
| 38 |
|
| 39 |
Any feedback is very welcome. |
| 40 |
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html |
| 41 |
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) |
| 42 |
|
| 43 |
$Id$ |
| 44 |
*/ |
| 45 |
|
| 46 |
|
| 47 |
#ifndef __include_rng_mt_header__ |
| 48 |
#define __include_rng_mt_header__ |
| 49 |
|
| 50 |
extern void init_genrand(uint32_t); |
| 51 |
extern void init_by_array(uint32_t[], int); |
| 52 |
extern uint32_t genrand_int32(void); |
| 53 |
#endif |