Rosetta 3.3
Public Member Functions | Protected Member Functions
numeric::random::mt19937_RG Class Reference

#include <mt19937.hh>

Inheritance diagram for numeric::random::mt19937_RG:
Inheritance graph
[legend]
Collaboration diagram for numeric::random::mt19937_RG:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mt19937_RG ()
virtual ~mt19937_RG ()
void setSeed (int const iseed)
 Set seed and state.
void setSeed (std::string const &)
 Set seed and state.
double getRandom ()
virtual void saveState (std::ostream &out)
 Serializes generator state to stream losslessly.
virtual void restoreState (std::istream &in)
 Deserializes generator state from stream losslessly.

Protected Member Functions

void initial_mask (void)
void period_certification ()
void init_by_array (uint32_t init_key[], int key_length)
void gen_rand_all (void)

Constructor & Destructor Documentation

numeric::random::mt19937_RG::mt19937_RG ( ) [inline]

References W128_T::d.

virtual numeric::random::mt19937_RG::~mt19937_RG ( ) [inline, virtual]

Member Function Documentation

void numeric::random::mt19937_RG::gen_rand_all ( void  ) [inline, protected]

This function fills the internal state array with double precision floating point pseudorandom numbers of the IEEE 754 format.

References numeric::random::do_recursion(), DSFMT_N, DSFMT_POS1, and color_pdb::i.

Referenced by getRandom().

double numeric::random::mt19937_RG::getRandom ( ) [inline, virtual]
void numeric::random::mt19937_RG::init_by_array ( uint32_t  init_key[],
int  key_length 
) [inline, protected]

This function initializes the internal state array, with an array of 32-bit integers used as the seeds

Parameters:
init_keythe array of 32-bit integers, used as a seed.
key_lengththe length of init_key.

References get_pdb::count, DSFMT_N, DSFMT_N64, color_pdb::i, numeric::random::ini_func1(), numeric::random::ini_func2(), initial_mask(), period_certification(), NetLink::r, numeric::random::sfmt_idxof(), amino_acids::size, and W128_T::u32.

void numeric::random::mt19937_RG::initial_mask ( void  ) [inline, protected]

This function initializes the internal state array to fit the IEEE 754 format.

References DSFMT_HIGH_CONST, DSFMT_LOW_MASK, DSFMT_N, color_pdb::i, and W128_T::u.

Referenced by init_by_array(), and setSeed().

void numeric::random::mt19937_RG::period_certification ( ) [inline, protected]

This function certificate the period of 2^{DSFMT_MEXP}-1.

References DSFMT_HIGH_CONST, DSFMT_MSK1, DSFMT_MSK2, DSFMT_N, DSFMT_PCV1, DSFMT_PCV2, DSFMT_SL2, DSFMT_SR1, DSFMT_SR2, basic::options::OptionKeys::optE::fix, color_pdb::i, and W128_T::u.

Referenced by init_by_array(), and setSeed().

virtual void numeric::random::mt19937_RG::restoreState ( std::istream &  in) [inline, virtual]

Deserializes generator state from stream losslessly.

Implements numeric::random::uniform_RG.

References DSFMT_N, color_pdb::i, and W128_T::u.

virtual void numeric::random::mt19937_RG::saveState ( std::ostream &  out) [inline, virtual]

Serializes generator state to stream losslessly.

Implements numeric::random::uniform_RG.

References DSFMT_N, color_pdb::i, and W128_T::u.

void numeric::random::mt19937_RG::setSeed ( int const  iseed) [inline, virtual]
void numeric::random::mt19937_RG::setSeed ( std::string const &  ) [inline, virtual]

Set seed and state.

Implements numeric::random::uniform_RG.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines