template class xf::fintech::MT19937IcnRng <double>¶
#include "rng.hpp"
Overview¶
Normally distributed random number generator based on InverseCumulative function, output datatype is double.
template <> class MT19937IcnRng <double> // fields MT19937 uniformRNG
Methods¶
seedInitialization¶
void seedInitialization (ap_uint <32> seed)
Initialization using seed.
Parameters:
seed | initialization seed |
statusSetup¶
void statusSetup (ap_uint <32> data [624])
Setup status.
Parameters:
data | initialization data for setting up status |
next¶
next overload (1)¶
double next ()
Get next normally distributed random number.
Returns:
a normally distributed random number
next overload (2)¶
void next ( double& uniformR, double& gaussianR )
Get next normally distributed random number and its corresponding uniformly distributed random number.
Parameters:
gaussianR | return normally distributed random number. |
uniformR | return uniformly distributed random number that corrresponding to gaussianR |
next overload (3)¶
void next (double& uniformR)
Get next uniformly distributed random number.
Parameters:
uniformR | return uniformly distributed random number |
nextTwo¶
void nextTwo ( double& gaussR, double& gaussL )
Get next two normally distributed random number.
Parameters:
gaussR | return first normally distributed random number. |
gaussL | return second normally distributed random number. |