2#include <util/random/Random.h>
3#include <util/containers/Array.h>
34 { randomPtr_ = &random; }
44 for (
int i = 0; i < n; ++i) {
45 data[i] = randomPtr_->uniform();
58 for (
int i = 0; i < n; ++i) {
59 data[i] = randomPtr_->uniform(min, max);
67 double stddev,
double mean)
72 for (
int i = 0; i < n; ++i) {
73 data[i] = mean + stddev * randomPtr_->gaussian();
94 void seedVecRandom<CPT>(VecRandom<CPT>& vr,
long seed)
VecRandom()
Default constructor.
Array container class template.
int capacity() const
Return allocated size.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.