![]() |
QMCPACK
|
Get a known sequence of random numbers for testing. More...
Public Member Functions | |
RandomForTest () | |
std::vector< VT > | getRngVec (int ncount) |
std::vector< std::complex< VT > > | getRngVecComplex (int ncount) |
void | fillVecRng (std::vector< VT > &rng_reals) |
void | fillVecRng (std::vector< std::complex< VT >> &rng_reals) |
void | fillBufferRng (VT *rng_reals, size_t number) |
void | fillBufferRng (std::complex< VT > *rng_reals, size_t number) |
VT | operator() () |
Private Attributes | |
StdRandom< VT > | rng |
Get a known sequence of random numbers for testing.
VT is the floating point precision While inelegant to have separate named calls for the cplx types in the same class separate class templates for RandomForTest<double> and RandomForTest<std::complex<double>> turned out to be surprisingly difficult. Someone is welcome to try when we required > c++14
Definition at line 31 of file RandomForTest.h.
RandomForTest | ( | ) |
Definition at line 20 of file RandomForTest.cpp.
void fillBufferRng | ( | VT * | rng_reals, |
size_t | number | ||
) |
Definition at line 63 of file RandomForTest.cpp.
Referenced by TestFillBufferRngReal< T >::operator()(), and TestFillBufferRngComplex< T >::operator()().
void fillBufferRng | ( | std::complex< VT > * | rng_reals, |
size_t | number | ||
) |
Definition at line 73 of file RandomForTest.cpp.
void fillVecRng | ( | std::vector< VT > & | rng_reals | ) |
Definition at line 45 of file RandomForTest.cpp.
Referenced by TestFillVecRngReal< T >::operator()(), TestFillVecRngComplex< T >::operator()(), and qmcplusplus::randomUpdateAccumulate().
void fillVecRng | ( | std::vector< std::complex< VT >> & | rng_reals | ) |
Definition at line 54 of file RandomForTest.cpp.
std::vector< VT > getRngVec | ( | int | ncount | ) |
Definition at line 26 of file RandomForTest.cpp.
Referenced by TestGetVecRngReal< T >::operator()().
std::vector< std::complex< VT > > getRngVecComplex | ( | int | ncount | ) |
Definition at line 35 of file RandomForTest.cpp.
Referenced by TestGetVecRngComplex< T >::operator()().
VT operator() | ( | ) |
Definition at line 84 of file RandomForTest.cpp.
|
private |
Definition at line 43 of file RandomForTest.h.