RandomLib  1.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
RandomLib::MixerSFMT Class Reference

The SFMT mixing functionality. More...

#include <RandomLib/RandomMixer.hpp>

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 ()
 

Static Public Attributes

static const unsigned version = 0x4d78534dUL
 

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++11 standard; 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 212 of file RandomMixer.hpp.

Member Typedef Documentation

The RandomType controlling the output of MixerSFMT::SeedToState

Definition at line 217 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.

Parameters
[in]seedthe input seed vector.
[out]statethe generator state.
[in]nthe size of the state.

Definition at line 606 of file Random.cpp.

static std::string RandomLib::MixerSFMT::Name ( )
inlinestatic

Return the name of this class.

Returns
the name.

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


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