![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
#include <MersenneTwister.hpp>
Inheritance diagram for cat::MersenneTwister:Classes | |
| struct | MT128 |
Public Member Functions | |
| u32 | Generate () |
| void | Generate (void *buffer, int bytes) |
| bool | Initialize () |
| bool | Initialize (u32 seed) |
| bool | Initialize (u32 *seeds, u32 words) |
| MersenneTwister () | |
Private Member Functions | |
| void | enforcePeriod () |
| void | round (MT128 *a, MT128 *b, MT128 *c, MT128 *d) |
| CAT_INLINE void | shiftLeft128 (MT128 *r, MT128 *n, u32 bits) |
| CAT_INLINE void | shiftRight128 (MT128 *r, MT128 *n, u32 bits) |
| void | update () |
Private Attributes | |
| MT128 | state [19937/128+1] |
| u32 * | state32 |
| u32 | used |
Static Private Attributes | |
| static const u32 | MEXP = 19937 |
| static const u32 | MSK1 = 0xdfffffefU |
| static const u32 | MSK2 = 0xddfecb7fU |
| static const u32 | MSK3 = 0xbffaffffU |
| static const u32 | MSK4 = 0xbffffff6U |
| static const u32 | N128 = MEXP/128 + 1 |
| static const u32 | N32 = N128 * 4 |
| static const u32 | N64 = N128 * 2 |
| static const u32 | POS1 = 122 |
| static const u32 | SL1 = 18 |
| static const u32 | SL2 = 1 |
| static const u32 | SL2BITS = SL2*8 |
| static const u32 | SR1 = 11 |
| static const u32 | SR2 = 1 |
| static const u32 | SR2BITS = SR2*8 |
Definition at line 43 of file MersenneTwister.hpp.
| cat::MersenneTwister::MersenneTwister | ( | ) |
| void cat::MersenneTwister::enforcePeriod | ( | ) | [private] |
| u32 cat::MersenneTwister::Generate | ( | ) | [virtual] |
Implements cat::IRandom.
| void cat::MersenneTwister::Generate | ( | void * | buffer, |
| int | bytes | ||
| ) | [virtual] |
Implements cat::IRandom.
| bool cat::MersenneTwister::Initialize | ( | ) |
| void cat::MersenneTwister::update | ( | ) | [private] |
const u32 cat::MersenneTwister::MEXP = 19937 [static, private] |
Definition at line 45 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::MSK1 = 0xdfffffefU [static, private] |
Definition at line 56 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::MSK2 = 0xddfecb7fU [static, private] |
Definition at line 57 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::MSK3 = 0xbffaffffU [static, private] |
Definition at line 58 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::MSK4 = 0xbffffff6U [static, private] |
Definition at line 59 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::N128 = MEXP/128 + 1 [static, private] |
Definition at line 46 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::N32 = N128 * 4 [static, private] |
Definition at line 48 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::N64 = N128 * 2 [static, private] |
Definition at line 47 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::POS1 = 122 [static, private] |
Definition at line 49 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SL1 = 18 [static, private] |
Definition at line 50 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SL2 = 1 [static, private] |
Definition at line 51 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SL2BITS = SL2*8 [static, private] |
Definition at line 52 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SR1 = 11 [static, private] |
Definition at line 53 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SR2 = 1 [static, private] |
Definition at line 54 of file MersenneTwister.hpp.
const u32 cat::MersenneTwister::SR2BITS = SR2*8 [static, private] |
Definition at line 55 of file MersenneTwister.hpp.
MT128 cat::MersenneTwister::state[19937/128+1] [private] |
Definition at line 65 of file MersenneTwister.hpp.
u32* cat::MersenneTwister::state32 [private] |
Definition at line 66 of file MersenneTwister.hpp.
u32 cat::MersenneTwister::used [private] |
Definition at line 67 of file MersenneTwister.hpp.
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.