QMCPACK
TestGetVecRngReal< T > Struct Template Reference
+ Inheritance diagram for TestGetVecRngReal< T >:
+ Collaboration diagram for TestGetVecRngReal< T >:

Public Types

using ref = RngReferenceVector< T >
 

Public Member Functions

void operator() ()
 

Detailed Description

template<typename T>
struct qmcplusplus::TestGetVecRngReal< T >

Definition at line 87 of file test_RandomForTest.cpp.

Member Typedef Documentation

◆ ref

using ref = RngReferenceVector<T>

Definition at line 89 of file test_RandomForTest.cpp.

Member Function Documentation

◆ operator()()

void operator() ( )
inline

Definition at line 90 of file test_RandomForTest.cpp.

References qmcplusplus::Units::distance::A, B(), qmcplusplus::CHECK(), qmcplusplus::checkArray, RandomForTest< VT >::getRngVec(), and qmcplusplus::n.

91  {
92  testing::RandomForTest<T> rng_for_test;
93  std::vector<T> rng_vector = rng_for_test.getRngVec(5);
94  std::vector<T> reference{0.120758, 0.301789, 0.853906, 0.297716, 0.377862};
95  auto checkArray = [](auto A, auto B, int n) {
96  for (int i = 0; i < n; ++i)
97  {
98  CHECK(A[i] == Approx(B[i]));
99  }
100  };
101  checkArray(rng_vector.data(), ref::vec.data(), 5);
102  }
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
double B(double x, int k, int i, const std::vector< double > &t)

The documentation for this struct was generated from the following file: