35 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
37 value.component(cmpt) = scalar01();
48 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
50 value.component(cmpt) = GaussNormal<scalar>();
61 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
63 value.component(cmpt) +=
64 scalar01()*(end.component(cmpt) - start.component(cmpt));
74 value = sample01<Type>();
85 value = sample01<Type>();
101 value = GaussNormal<Type>();
117 value = position<Type>(start, end);
133 value = sample01<Type>();
Traits class for primitives.
static bool master(const label communicator=0)
Am I the master process.
Type globalPosition(const Type &start, const Type &end)
Return a sample between start and end.
Type GaussNormal()
Return a sample whose components are normally distributed.
Type sample01()
Return a sample whose components lie in the range 0-1.
void randomise01(Type &value)
Randomise value in the range 0-1.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
Type globalGaussNormal()
Return a sample whose components are normally distributed.
void globalRandomise01(Type &value)
Randomise value in the range 0-1.
Type position(const Type &start, const Type &end)
Return a sample between start and end.
Type globalSample01()
Return a sample whose components lie in the range 0-1.