Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RandomNumbers_Mseries Class Reference

Random number generator base on M-series. More...

#include <randomNumbers_Mseries.h>

Inheritance diagram for RandomNumbers_Mseries:
RandomNumbers

Public Member Functions

 RandomNumbers_Mseries (const int ndelay)
 
 RandomNumbers_Mseries (const std::string &filename)
 
double get ()
 
void write_file (const std::string &)
 
void read_file (const std::string &)
 save and load random number status. More...
 
void reset (unsigned long seed)
 reset state with new seed. More...
 
- Public Member Functions inherited from RandomNumbers
 RandomNumbers ()
 
virtual ~RandomNumbers ()
 
void set_parameter_verboselevel (const Bridge::VerboseLevel vl)
 
void gauss (double &rand1, double &rand2)
 
virtual void lex_global (const std::string &, Field &)
 
virtual void gauss_lex_global (Field &)
 gaussian random number defined on global lattice. More...
 
virtual void uniform_lex_global (Field &)
 uniform random number defined on global lattice. More...
 
virtual void U1_lex_global (Field &)
 U(1) random number defined on global lattice. More...
 
virtual void Z2_lex_global (Field &)
 Z(2) random number defined on global lattice. More...
 
virtual void gauss_eo_global (Field &)
 gaussian noise for even-odd perconditioned field (S.UEDA) More...
 

Static Public Attributes

static const std::string class_name = "RandomNumbers_Mseries"
 
- Static Public Attributes inherited from RandomNumbers
static const std::string class_name = "RandomNumbers"
 

Private Member Functions

void initset (const int ndelay)
 
void delay3 (const int ndelay)
 

Private Attributes

int w [Np]
 
int jr
 
int kr
 
double sq2r
 
double pi
 
double pi2
 

Static Private Attributes

static const double Fnorm = 4.656612870908988e-10
 initialized in .cpp file. More...
 
static const int Np = 521
 
static const int Nq = 32
 

Additional Inherited Members

- Protected Attributes inherited from RandomNumbers
Bridge::VerboseLevel m_vl
 

Detailed Description

Random number generator base on M-series.

This class generates the M-series random numbers. The original version in Fortran was written by J.Makino and O.Miyamura (Ver.3.0 21 July 1991). Public version is available under GNU GPL: Shinji Hioki, QCDMPI http://insam.sci.hiroshima-u.ac.jp/QCDMPI/ which implements Jun Makino, "Lagged-Fibonacci random number generators on parallel computers", Parallel Computing, 20 (1994) 1357-1367.

An instance is created with a given integer number which is used to set the initial random numbers. [23 Jul 2012 H.Matsufuru]

Definition at line 46 of file randomNumbers_Mseries.h.

Constructor & Destructor Documentation

RandomNumbers_Mseries::RandomNumbers_Mseries ( const int  ndelay)
inline

Definition at line 63 of file randomNumbers_Mseries.h.

RandomNumbers_Mseries::RandomNumbers_Mseries ( const std::string &  filename)
inline

Definition at line 68 of file randomNumbers_Mseries.h.

Member Function Documentation

void RandomNumbers_Mseries::delay3 ( const int  ndelay)
private

Definition at line 77 of file randomNumbers_Mseries.cpp.

double RandomNumbers_Mseries::get ( )
inlinevirtual

Implements RandomNumbers.

Definition at line 73 of file randomNumbers_Mseries.h.

void RandomNumbers_Mseries::initset ( const int  ndelay)
private

Definition at line 35 of file randomNumbers_Mseries.cpp.

void RandomNumbers_Mseries::read_file ( const std::string &  )
virtual

save and load random number status.

Implements RandomNumbers.

Definition at line 167 of file randomNumbers_Mseries.cpp.

void RandomNumbers_Mseries::reset ( unsigned long  seed)
virtual

reset state with new seed.

Implements RandomNumbers.

Definition at line 28 of file randomNumbers_Mseries.cpp.

void RandomNumbers_Mseries::write_file ( const std::string &  filename)
virtual

Implements RandomNumbers.

Definition at line 142 of file randomNumbers_Mseries.cpp.

Member Data Documentation

const std::string RandomNumbers_Mseries::class_name = "RandomNumbers_Mseries"
static

Definition at line 52 of file randomNumbers_Mseries.h.

const double RandomNumbers_Mseries::Fnorm = 4.656612870908988e-10
staticprivate

initialized in .cpp file.

Definition at line 49 of file randomNumbers_Mseries.h.

int RandomNumbers_Mseries::jr
private

Definition at line 57 of file randomNumbers_Mseries.h.

int RandomNumbers_Mseries::kr
private

Definition at line 57 of file randomNumbers_Mseries.h.

const int RandomNumbers_Mseries::Np = 521
staticprivate

Definition at line 55 of file randomNumbers_Mseries.h.

const int RandomNumbers_Mseries::Nq = 32
staticprivate

Definition at line 55 of file randomNumbers_Mseries.h.

double RandomNumbers_Mseries::pi
private

Definition at line 60 of file randomNumbers_Mseries.h.

double RandomNumbers_Mseries::pi2
private

Definition at line 60 of file randomNumbers_Mseries.h.

double RandomNumbers_Mseries::sq2r
private

Definition at line 59 of file randomNumbers_Mseries.h.

int RandomNumbers_Mseries::w[Np]
private

Definition at line 56 of file randomNumbers_Mseries.h.


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