|
14 | 14 | +----------------------------------------------------------------------+
|
15 | 15 | */
|
16 | 16 |
|
| 17 | +/* |
| 18 | + The following functions are based on a C++ class MTRand by |
| 19 | + Richard J. Wagner. For more information see the web page at |
| 20 | + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/MersenneTwister.h |
| 21 | + Mersenne Twister random number generator -- a C++ class MTRand |
| 22 | + Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus |
| 23 | + Richard J. Wagner v1.0 15 May 2003 [email protected] |
| 24 | + The Mersenne Twister is an algorithm for generating random numbers. It |
| 25 | + was designed with consideration of the flaws in various other generators. |
| 26 | + The period, 2^19937-1, and the order of equidistribution, 623 dimensions, |
| 27 | + are far greater. The generator is also fast; it avoids multiplication and |
| 28 | + division, and it benefits from caches and pipelines. For more information |
| 29 | + see the inventors' web page at http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html |
| 30 | + Reference |
| 31 | + M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally |
| 32 | + Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on |
| 33 | + Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30. |
| 34 | + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, |
| 35 | + Copyright (C) 2000 - 2003, Richard J. Wagner |
| 36 | + All rights reserved. |
| 37 | + Redistribution and use in source and binary forms, with or without |
| 38 | + modification, are permitted provided that the following conditions |
| 39 | + are met: |
| 40 | + 1. Redistributions of source code must retain the above copyright |
| 41 | + notice, this list of conditions and the following disclaimer. |
| 42 | + 2. Redistributions in binary form must reproduce the above copyright |
| 43 | + notice, this list of conditions and the following disclaimer in the |
| 44 | + documentation and/or other materials provided with the distribution. |
| 45 | + 3. The names of its contributors may not be used to endorse or promote |
| 46 | + products derived from this software without specific prior written |
| 47 | + permission. |
| 48 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 49 | + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 50 | + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 51 | + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 52 | + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 53 | + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 54 | + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 55 | + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 56 | + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 57 | + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 58 | + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 59 | +*/ |
| 60 | + |
17 | 61 | #ifdef HAVE_CONFIG_H
|
18 | 62 | # include "config.h"
|
19 | 63 | #endif
|
@@ -779,7 +823,7 @@ PHP_METHOD(Random, __unserialize)
|
779 | 823 | /* {{{ PHP_MINIT_FUNCTION */
|
780 | 824 | PHP_MINIT_FUNCTION(random_ext)
|
781 | 825 | {
|
782 |
| - /* Random\NumberGenerator\RandomNumberGenerator */ |
| 826 | + /* Random\NumberGenerator */ |
783 | 827 | random_ce_Random_NumberGenerator = register_class_Random_NumberGenerator();
|
784 | 828 |
|
785 | 829 | /* Random\NumberGenerator\XorShift128Plus */
|
|
0 commit comments