C++ implementation of dSFMT random number generator. More...
#include <itpp/base/random_dsfmt.h>
Classes | |
struct | Context |
DSFMT context structure. More... | |
Public Member Functions | |
DSFMT (Context &c) | |
Constructor using a certain context. | |
void | init_gen_rand (unsigned int seed) |
Initialise the generator with a new seed. | |
uint32_t | genrand_uint32 () |
Generate uniform [0, UINT_MAX) integer pseudorandom number. | |
double | genrand_close1_open2 () |
Generate uniform [1, 2) double pseudorandom number. | |
double | genrand_open_open () |
Generate uniform (0, 1) double pseudorandom number. | |
C++ implementation of dSFMT random number generator.
The DSFMT class implements parts of the Double precision SIMD-oriented Fast Mersenne Twister (dSFM) random number generator. DSFMT directly generates double precision floating point random numbers, which have the IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985) format. DSFMT does not support integer outputs.
Visit http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html for more details on the original dSFMT implementation.
Here is a copy of the LICENSE.txt file from the dSFMT-src-2.0.tar.gz package, on which C++ DSFMT implementation is based:
* Copyright (c) 2007, 2008 Mutsuo Saito, Makoto Matsumoto and Hiroshima * University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the Hiroshima University nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
Definition at line 98 of file random_dsfmt.h.
|
inline |
Initialise the generator with a new seed.
This function initializes the internal state array with a 32-bit integer seed.
seed | a 32-bit integer used as the seed. |
Definition at line 154 of file random_dsfmt.h.
Referenced by itpp::RNG_randomize(), and itpp::RNG_reset().
|
inline |
Generate uniform [1, 2) double pseudorandom number.
This function generates and returns double precision pseudorandom number which distributes uniformly in the range [1, 2). This is the primitive and faster than generating numbers in other ranges. init_gen_rand()
must be called before this function.
Definition at line 186 of file random_dsfmt.h.
|
inline |
Generate uniform (0, 1) double pseudorandom number.
This function generates and returns double precision pseudorandom number which distributes uniformly in the range (0, 1). init_gen_rand()
must be called before this function.
Definition at line 203 of file random_dsfmt.h.
Generated on Sat May 25 2013 16:32:34 for IT++ by Doxygen 1.8.2