template class xf::fintech::MT19937IcnRng¶
#include "rng.hpp"
Overview¶
Normally distributed random number generator based on InverseCumulative function.
Parameters:
mType | data type supported including float and double |
template <typename mType> class MT19937IcnRng
Methods¶
MT19937IcnRng¶
MT19937IcnRng overload (2)¶
MT19937IcnRng (ap_uint <32> seed)
Constructor with seed.
Parameters:
seed | initialization seed |
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)¶
mType next ()
Get next normally distributed random number.
Returns:
a normally distributed random number
next overload (2)¶
void next (mType& uniformR)
Get next uniformly distributed random number.
Parameters:
uniformR | return uniformly distributed random number |
next overload (3)¶
void next ( mType& uniformR, mType& 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 |
nextTwo¶
void nextTwo ( mType& gaussR, mType& gaussL )
Get next two normally distributed random numbers.
Parameters:
gaussR | return first normally distributed random number. |
gaussL | return second normally distributed random number. |