Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RandomNumbers_MT19937 Class Reference

#include <randomNumbers_MT19937.h>

Inheritance diagram for RandomNumbers_MT19937:
RandomNumbers

Public Member Functions

 RandomNumbers_MT19937 (int s)
 
 RandomNumbers_MT19937 (unsigned long s)
 
 RandomNumbers_MT19937 (std::vector< unsigned long > &key)
 
 RandomNumbers_MT19937 (const std::string filename)
 
 ~RandomNumbers_MT19937 ()
 
double get ()
 
void writefile (const std::string)
 
- Public Member Functions inherited from RandomNumbers
 RandomNumbers ()
 
virtual ~RandomNumbers ()
 
void set_parameter_verboselevel (const Bridge::VerboseLevel vl)
 
void gauss (double &rn1, double &rn2)
 
void uniform (Field &)
 
void gauss (Field &)
 
void gauss_lex_global (Field &)
 gaussian random number defined on global lattice. More...
 
void gauss_eo_global (Field &)
 gaussian noise for even-odd perconditioned field (S.UEDA) More...
 
void uniform_lex_global (Field &)
 uniform random number defined on global lattice. More...
 

Private Types

enum  { N =624, M =397 }
 

Private Member Functions

void init (unsigned long s)
 
void init (unsigned long s, std::vector< unsigned long > &key)
 
void nextState () const
 
unsigned long twist (unsigned long u, unsigned long v) const
 
unsigned long randInt32 () const
 
long randInt31 () const
 
double randDouble1 () const
 
double randDouble2 () const
 
double randDouble3 () const
 
double randRes53 () const
 

Private Attributes

int m_left
 
unsigned long m_state [N]
 
unsigned long * m_next
 

Additional Inherited Members

- Protected Attributes inherited from RandomNumbers
Bridge::VerboseLevel m_vl
 

Detailed Description

Definition at line 33 of file randomNumbers_MT19937.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
N 
M 

Definition at line 72 of file randomNumbers_MT19937.h.

Constructor & Destructor Documentation

RandomNumbers_MT19937::RandomNumbers_MT19937 ( int  s)

Definition at line 30 of file randomNumbers_MT19937.cpp.

RandomNumbers_MT19937::RandomNumbers_MT19937 ( unsigned long  s)

Definition at line 41 of file randomNumbers_MT19937.cpp.

RandomNumbers_MT19937::RandomNumbers_MT19937 ( std::vector< unsigned long > &  key)
RandomNumbers_MT19937::RandomNumbers_MT19937 ( const std::string  filename)
RandomNumbers_MT19937::~RandomNumbers_MT19937 ( )
inline

Definition at line 42 of file randomNumbers_MT19937.h.

Member Function Documentation

double RandomNumbers_MT19937::get ( )
inlinevirtual

Implements RandomNumbers.

Definition at line 44 of file randomNumbers_MT19937.h.

void RandomNumbers_MT19937::init ( unsigned long  s)
private

Definition at line 119 of file randomNumbers_MT19937.cpp.

void RandomNumbers_MT19937::init ( unsigned long  s,
std::vector< unsigned long > &  key 
)
private
void RandomNumbers_MT19937::nextState ( ) const
private

Definition at line 170 of file randomNumbers_MT19937.cpp.

double RandomNumbers_MT19937::randDouble1 ( ) const
private

Definition at line 229 of file randomNumbers_MT19937.cpp.

double RandomNumbers_MT19937::randDouble2 ( ) const
private

Definition at line 239 of file randomNumbers_MT19937.cpp.

double RandomNumbers_MT19937::randDouble3 ( ) const
private

Definition at line 249 of file randomNumbers_MT19937.cpp.

long RandomNumbers_MT19937::randInt31 ( ) const
private

Definition at line 220 of file randomNumbers_MT19937.cpp.

unsigned long RandomNumbers_MT19937::randInt32 ( ) const
private

Definition at line 204 of file randomNumbers_MT19937.cpp.

double RandomNumbers_MT19937::randRes53 ( ) const
private

Definition at line 259 of file randomNumbers_MT19937.cpp.

unsigned long RandomNumbers_MT19937::twist ( unsigned long  u,
unsigned long  v 
) const
private

Definition at line 188 of file randomNumbers_MT19937.cpp.

void RandomNumbers_MT19937::writefile ( const std::string  )

Definition at line 97 of file randomNumbers_MT19937.cpp.

Member Data Documentation

int RandomNumbers_MT19937::m_left
mutableprivate

Definition at line 74 of file randomNumbers_MT19937.h.

unsigned long* RandomNumbers_MT19937::m_next
mutableprivate

Definition at line 76 of file randomNumbers_MT19937.h.

unsigned long RandomNumbers_MT19937::m_state[N]
mutableprivate

Definition at line 75 of file randomNumbers_MT19937.h.


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