Kokkos Node API and Local Linear Algebra Kernels Version of the Day

(Pseudo)random normal(0,1) floatingpoint number generator. More...
#include <Tsqr_Random_NormalGenerator.hpp>
Public Member Functions  
NormalGenerator (const std::vector< int > &iseed, const int bufferLength=defaultBufferLength())  
Constructor with custom seed.  
NormalGenerator (const int bufferLength=defaultBufferLength())  
Constructor with default seed.  
Scalar  operator() () 
Get the next pseudorandom number.  
void  getSeed (std::vector< int > &iseed) const 
Get the current seed. 
(Pseudo)random normal(0,1) floatingpoint number generator.
Implemented using LAPACK's _LARNV routines.
Definition at line 48 of file Tsqr_Random_NormalGenerator.hpp.
TSQR::Random::NormalGenerator< Ordinal, Scalar >::NormalGenerator  (  const std::vector< int > &  iseed, 
const int  bufferLength = defaultBufferLength() 

)  [inline] 
Constructor with custom seed.
iseed  [in] Array of four integers, representing the seed. See documentation of LAPACK's _LARNV routines for requirements. In particular, the array elements must be in [0,4095], and the last element (iseed[3]) must be odd. 
bufferLength  [in] How many entries we keep buffered at one time. If you know how many outputs you want, set this accordingly, so that all the expense of generation happens at construction. 
Definition at line 69 of file Tsqr_Random_NormalGenerator.hpp.
TSQR::Random::NormalGenerator< Ordinal, Scalar >::NormalGenerator  (  const int  bufferLength = defaultBufferLength()  )  [inline] 
Constructor with default seed.
The fourinteger seed is set to [0, 0, 0, 1], which is a valid seed and which ensures a reproducible sequence.
bufferLength  [in] How many entries we keep buffered at one time. If you know how many outputs you want, set this accordingly, so that all the expense of generation happens at construction. 
Definition at line 90 of file Tsqr_Random_NormalGenerator.hpp.
Scalar TSQR::Random::NormalGenerator< Ordinal, Scalar >::operator()  (  )  [inline] 
Get the next pseudorandom number.
If the buffer length is > 0, the buffer is first filled with newly generated values if it's empty, and then the value is fetched from the buffer. Depending on the buffer length, filling it may take a while, which means that calling this function may on occasion take longer than you expect. If you don't like this behavior, use a buffer length of 1.
Definition at line 111 of file Tsqr_Random_NormalGenerator.hpp.
void TSQR::Random::NormalGenerator< Ordinal, Scalar >::getSeed  (  std::vector< int > &  iseed  )  const [inline] 
Get the current seed.
The seed consists of four integers, according to the requirements of LAPACK's _LARNV routines. This can be used to restart the generator, but only if you account for the buffered values.
iseed  [out] Vector of length exactly four. Resized if necessary. 
Definition at line 123 of file Tsqr_Random_NormalGenerator.hpp.