ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::math::merseinne_twister_generator< ValueT > Class Template Reference

A pseudo-random number generator implementation using the merseinne twister MT 19937 cf. Makoto Matsumoto, Takuji Nishimura: Mersenne twister. "A 623-dimensionally equidistributed uniform pseudorandom number generator." ACM Transactions on Modeling and Computer Simulation 8, 1998. More...

#include <random.hpp>

Public Member Functions

 merseinne_twister_generator ()
 Default CTOR to ensure default constructability. More...
 
 merseinne_twister_generator (unsigned int seed)
 CTOR, which accepts the seed to the generator. More...
 
void seed (unsigned int s)
 Sets the seed of the pseudo-random number generator. More...
 
ValueT operator() ()
 Returns a pseudo-random number using MT19937. Not const, since the internal state is being changed! More...
 

Detailed Description

template<typename ValueT = double>
class viennashe::math::merseinne_twister_generator< ValueT >

A pseudo-random number generator implementation using the merseinne twister MT 19937 cf. Makoto Matsumoto, Takuji Nishimura: Mersenne twister. "A 623-dimensionally equidistributed uniform pseudorandom number generator." ACM Transactions on Modeling and Computer Simulation 8, 1998.

Definition at line 76 of file random.hpp.

Constructor & Destructor Documentation

◆ merseinne_twister_generator() [1/2]

template<typename ValueT = double>
viennashe::math::merseinne_twister_generator< ValueT >::merseinne_twister_generator ( )
inline

Default CTOR to ensure default constructability.

Definition at line 82 of file random.hpp.

◆ merseinne_twister_generator() [2/2]

template<typename ValueT = double>
viennashe::math::merseinne_twister_generator< ValueT >::merseinne_twister_generator ( unsigned int  seed)
inline

CTOR, which accepts the seed to the generator.

Definition at line 85 of file random.hpp.

Member Function Documentation

◆ operator()()

template<typename ValueT = double>
ValueT viennashe::math::merseinne_twister_generator< ValueT >::operator() ( )
inline

Returns a pseudo-random number using MT19937. Not const, since the internal state is being changed!

Definition at line 96 of file random.hpp.

◆ seed()

template<typename ValueT = double>
void viennashe::math::merseinne_twister_generator< ValueT >::seed ( unsigned int  s)
inline

Sets the seed of the pseudo-random number generator.

Parameters
sThe seed to get reproduceable sequences of numbers

Definition at line 91 of file random.hpp.


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