template class xf::fintech::MT2203IcnRng¶
#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 MT2203IcnRng
Methods¶
MT2203IcnRng¶
MT2203IcnRng (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¶
statusSetup overload (1)¶
void statusSetup (ap_uint <32> data [624])
Setup status.
Parameters:
data | initialization data to setup status |
statusSetup overload (2)¶
void statusSetup ( ap_uint <32> A, ap_uint <32> B, ap_uint <32> C )
Setup status.
Parameters:
A | value for configurable parameter A |
B | value for configurable parameter B |
C | value for configurable parameter C |
next¶
next overload (1)¶
mType next ()
brief 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 a uniformly distributed random bumber |
next overload (3)¶
void next ( mType& uniformR, mType& gaussianR )
Get next normally distributed random number and its corresponding uniformly distributed random number.
Parameters:
uniformR | return next uniformly distributed random number |
gaussianR | return next normally distributed random number |