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

Public Types

using ref = RngReferenceVector< T >
 

Public Member Functions

void operator() ()
 

Detailed Description

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

Definition at line 67 of file test_RandomForTest.cpp.

Member Typedef Documentation

◆ ref

using ref = RngReferenceVector<T>

Definition at line 69 of file test_RandomForTest.cpp.

Member Function Documentation

◆ operator()()

void operator() ( )
inline

Definition at line 70 of file test_RandomForTest.cpp.

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

71  {
72  testing::RandomForTest<T> rng_for_test;
73  std::vector<T> rng_vector(5);
74  rng_for_test.fillVecRng(rng_vector);
75  std::vector<T> reference{0.120758, 0.301789, 0.853906, 0.297716, 0.377862};
76  auto checkArray = [](auto A, auto B, int n) {
77  for (int i = 0; i < n; ++i)
78  {
79  CHECK(A[i] == Approx(B[i]));
80  }
81  };
82  checkArray(rng_vector.data(), ref::vec.data(), 5);
83  }
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: