16 #ifndef QMCPLUSPLUS_RANDOMSEQUENCEGENERATOR_H 17 #define QMCPLUSPLUS_RANDOMSEQUENCEGENERATOR_H 19 #include <type_traits> 23 #include "config/stdlib/Constants.h" 32 template<
class T,
class RG>
35 OHMMS_PRECISION_FULL slightly_less_than_one = 1.0 - std::numeric_limits<OHMMS_PRECISION_FULL>::epsilon();
37 OHMMS_PRECISION_FULL temp1, temp2;
38 for (
int i = 0; i < nm1; i += 2)
41 temp2 = 2.0 * M_PI * rng();
48 temp2 = 2.0 * M_PI * rng();
63 template<
class T,
class RG>
66 for (
int i = 0; i <
n; i++)
70 template<
typename T,
unsigned D,
class RG>
76 template<
typename T,
unsigned D,
class RG>
82 template<
typename T,
class RG>
85 static_assert(std::is_floating_point<T>::value,
86 "makeGaussRandomWithEngine(std::vector<T>...) only implemented for floating point T");
90 template<
typename T,
class RG>
96 template<CoordsType CT,
class RG>
helper functions for EinsplineSetBuilder
MakeReturn< UnaryNode< FnSin, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sin(const Vector< T1, C1 > &l)
Attaches a unit to a Vector for IO.
void assignGaussRand(T *restrict a, unsigned n, RG &rng)
size_type size() const
return the current size
MakeReturn< UnaryNode< FnCos, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t cos(const Vector< T1, C1 > &l)
void assignUniformRand(T *restrict a, unsigned n, RG &rng)
MakeReturn< UnaryNode< FnLog, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t log(const Vector< T1, C1 > &l)
Declaraton of ParticleAttrib<T> derived from Vector.
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
void makeGaussRandomWithEngine(ParticleAttrib< TinyVector< T, D >> &a, RG &rng)