|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Declares templates that fill an NDArray with a constant, uniform random integers or normal random values. More...
Namespaces | |
| namespace | psalg |
| Usage. | |
Functions | |
| template<typename T > | |
| void | psalg::fill_ndarray_const (NDArray< T > &a, const T &c) |
| Set every element of a to c. | |
| template<typename T > | |
| void | psalg::fill_ndarray_random (NDArray< T > &a, int range=100) |
| Set every element of a to std::rand() % range, cast to T. | |
| template<typename T > | |
| void | psalg::fill_ndarray_normal (NDArray< T > &a, double mean=0, double stddev=1) |
| Set every element of a to a sample from a normal distribution with the given mean and stddev, cast to T. | |
Declares templates that fill an NDArray with a constant, uniform random integers or normal random values.