template class xf::fintech::MT19937IcnRng <float>¶
#include "rng.hpp"
Overview¶
Normally distributed random number generator based on InverseCumulative function, output datatype is float.
template <> class MT19937IcnRng <float> // 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)¶
float next ()
Get next normally distributed random number.
Returns:
a normally distributed random number
next overload (2)¶
void next ( float& uniformR, float& gaussianR )
Get a 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 (float& uniformR)
Get next uniformly distributed random number.
param uniformR return a uniformly distributed random number
nextTwo¶
void nextTwo ( float& gaussR, float& gaussL )
Get next two normally distributed random number.
Parameters:
gaussR | return first normally distributed random number. |
gaussL | return second normally distributed random number. |