Public Types | Static Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Static Private Attributes
RandomLib::MixerSFMT Class Reference

The SFMT mixing functionality. More...

#include <RandomLib-2010-01/RandomMixer.hpp>

List of all members.

Public Types

typedef Random_u32 mixer_t

Static Public Member Functions

static void SeedToState (const std::vector< RandomSeed::seed_type > &seed, mixer_type state[], unsigned n) throw ()
static std::string Name () throw ()

Static Public Attributes

static const unsigned version = 0x4d78534dUL

Private Types

typedef mixer_t::type mixer_type

Private Attributes

static const mixer_type b = 1664525UL
static const mixer_type c = 1566083941UL

Static Private Attributes

static const mixer_type mask = mixer_t::mask
static const mixer_type a = 0x8b8b8b8bUL

Detailed Description

The SFMT mixing functionality.

MixerSFMT is adapted from SFMT's init_by_array Mutsuo Saito given in http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/SFMT-src-1.2.tar.gz and is part of the C++0X proposal; see P. Becker, Working Draft, Standard for Programming Language C++, Oct. 2007, Sec. 26.4.7.1, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf

MixerSFMT contains a single change is to allow it to function properly when the size of the state is small.

MixerSFMT mixes the seed much more thoroughly than MixerMT1 and, in particular, it removes the mixing bottleneck present in MixerMT1. Thus it is the recommended mixing scheme for all production work.


Member Typedef Documentation

The RandomType controlling the output of MixerMT1::SeedToState

Definition at line 194 of file RandomMixer.hpp.

The unsigned type corresponding to mixer_t.

Definition at line 205 of file RandomMixer.hpp.


Member Function Documentation

void RandomLib::MixerSFMT::SeedToState ( const std::vector< RandomSeed::seed_type > &  seed,
mixer_type  state[],
unsigned  n 
) throw () [static]

Mix the seed vector, seed, into the state array, state, of size n.

Definition at line 607 of file Random.cpp.

static std::string RandomLib::MixerSFMT::Name ( ) throw () [inline, static]

Return the name of this class.

Definition at line 220 of file RandomMixer.hpp.


Member Data Documentation

const unsigned RandomLib::MixerSFMT::version = 0x4d78534dUL [static]

A version number which should be unique to this RandomMixer. This prevents RandomEngine::Load from loading a saved generator with a different RandomMixer. Here the version is "MxSM".

Definition at line 200 of file RandomMixer.hpp.

The mask for mixter_t.

Definition at line 209 of file RandomMixer.hpp.

const mixer_type RandomLib::MixerSFMT::a = 0x8b8b8b8bUL [static, private]

Definition at line 222 of file RandomMixer.hpp.

const mixer_type RandomLib::MixerSFMT::b = 1664525UL [private]

Definition at line 222 of file RandomMixer.hpp.

const mixer_type RandomLib::MixerSFMT::c = 1566083941UL [private]

Definition at line 222 of file RandomMixer.hpp.


The documentation for this class was generated from the following files: