Template Class poisson_distribution
Defined in File rocrand.hpp
Nested Relationships
Nested Types
Class Documentation
-
template<class IntType = unsigned int>
class poisson_distribution Produces random non-negative integer values distributed according to Poisson distribution.
- Template Parameters:
IntType – - type of generated values. Only
unsingedinttype is supported.
Public Functions
-
inline poisson_distribution(double mean = 1.0)
Constructs a new distribution object.
- Parameters:
mean – - A mean distribution parameter.
-
inline poisson_distribution(const param_type ¶ms)
Constructs a new distribution object.
- Parameters:
params – - Distribution parameters
-
inline void reset()
Resets distribution’s internal state if there is any.
-
inline double mean() const
Returns the mean distribution parameter.
The mean (also known as lambda) is the average number of events per interval. The default value is 1.0.
-
inline param_type param() const
Returns the distribution parameter object.
-
inline void param(const param_type ¶ms)
Sets the distribution parameter object.
-
template<class Generator>
inline void operator()(Generator &g, IntType *output, size_t size) Fills
outputwith random non-negative integer values distributed according to Poisson distribution.Generates
sizerandom non-negative integer values distributed according to Poisson distribution, and stores them into the device memory referenced byoutputpointer.Requirements:
The device memory pointed by
outputmust have been previously allocated and be large enough to store at leastsizevalues ofIntTypetype.If generator
gis a quasi-random number generator (hiprand_cpp::sobol32_engine), thensizemust be a multiple of that generator’s dimension.
See also: rocrand_generate_poisson()
- Parameters:
g – - An uniform random number generator object
output – - Pointer to device memory to store results
size – - Number of values to generate
-
inline bool operator==(const poisson_distribution<IntType> &other)
Returns
trueif the distribution is the same asother.Two distribution are equal, if their parameters are equal.
-
inline bool operator!=(const poisson_distribution<IntType> &other)
Returns
trueif the distribution is different fromother.Two distribution are equal, if their parameters are equal.
-
class param_type
The type of the distribution parameter set.
Public Types
-
using distribution_type = poisson_distribution<IntType>
Public Functions
-
inline param_type(double mean = 1.0)
-
param_type(const param_type ¶ms) = default
-
inline double mean() const
Returns the mean distribution parameter.
The mean (also known as lambda) is the average number of events per interval. The default value is 1.0.
-
inline bool operator==(const param_type &other)
Returns
trueif the param_type is the same asother.
-
inline bool operator!=(const param_type &other)
Returns
trueif the param_type is different fromother.
-
using distribution_type = poisson_distribution<IntType>