|
IPPL API Reference
Independent Parallel Particle Layer C++ API
|
Functor to generate random numbers from a normal distribution. More...
#include <Randn.h>
Collaboration diagram for ippl::random::randn< T, Dim >:Public Types | |
| using | view_type = typename ippl::detail::ViewType< ippl::Vector< double, Dim >, 1 >::view_type |
| using | GeneratorPool = typename Kokkos::Random_XorShift64_Pool<> |
Public Member Functions | |
| KOKKOS_INLINE_FUNCTION | randn (view_type v_, GeneratorPool rand_pool_, T *mu_p, T *sd_p) |
| Constructor for the randn functor. | |
| KOKKOS_INLINE_FUNCTION | randn (view_type v_, GeneratorPool rand_pool_) |
| KOKKOS_INLINE_FUNCTION const T & | getMu (unsigned int idx) const |
| Getter function for mean in idx dimension. | |
| KOKKOS_INLINE_FUNCTION const T & | getSd (unsigned int idx) const |
| Getter function for the standard deviation in idx dimension. | |
| KOKKOS_INLINE_FUNCTION void | operator() (const size_t i) const |
| Operator to generate random numbers. | |
Public Attributes | |
| view_type | v |
| GeneratorPool | rand_pool |
| T | mu [Dim] |
| T | sd [Dim] |
Functor to generate random numbers from a normal distribution.
This functor can be used to generates random numbers from a normal distribution with mean 0 and standard deviation 1.
| T | Data type of the random numbers. |
| GeneratorPool | Type of the random number generator pool. |
| Dim | Dimensionality of the random numbers. |
|
inline |
Constructor for the randn functor.
| v_ | Output view for the random numbers. |
| rand_pool_ | The random number generator pool. |
| mu | The array of means in each dimension |
| sd | The array of standard deviation in each dimension |
|
inline |
Getter function for mean in idx dimension.
| idx | The index indicating the dimension. |
|
inline |
Getter function for the standard deviation in idx dimension.
| idx | The index indicating the dimension. |
|
inline |
Operator to generate random numbers.
| i | Index for the random numbers. |