RandomLib::MixerSFMT Class Reference

The SFMT mixing functionality. More...

#include <RandomLib/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

Static Private Attributes

static const mixer_type mask = mixer_t::mask
static const mixer_type a = 0x8b8b8b8bUL
static const mixer_type b = 1664525UL
static const mixer_type c = 1566083941UL

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.

Definition at line 190 of file RandomMixer.hpp.


Member Typedef Documentation

The RandomType controlling the output of MixerMT1::SeedToState

Definition at line 195 of file RandomMixer.hpp.

The unsigned type corresponding to mixer_t.

Definition at line 206 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 608 of file Random.cpp.

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

Return the name of this class.

Definition at line 221 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 201 of file RandomMixer.hpp.

The mask for mixter_t.

Definition at line 210 of file RandomMixer.hpp.

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

Definition at line 223 of file RandomMixer.hpp.

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

Definition at line 223 of file RandomMixer.hpp.

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

Definition at line 223 of file RandomMixer.hpp.


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

Generated on Thu Dec 31 15:24:30 2009 by  doxygen 1.6.1