onemkl::rng::negbinomial¶
Generates random numbers with negative binomial distribution.
Syntax
template<typename T = std::int32_t, method Method = nbar>
class negbinomial {
public:
negbinomial(): negbinomial(0.1, 0.5){}
negbinomial(double a, double p)
negbinomial(const negbinomial<T, Method>& other)
double a() const
double p() const
negbinomial<T, Method>& operator=(const negbinomial<T, Method>& other)
}
Include Files
mkl_sycl.hpp
Description
The onemkl::rng::negbinomial class object is used in the
onemkl::rng::generate function to provide random numbers with
negative binomial distribution and distribution parameters a
and p, where p, a∈R; 0 < p < 1; a > 0.
If the first distribution parameter a∈N, this
distribution is the same as Pascal distribution. If
a∈N, the distribution can be interpreted as the
expected time of a-th success in a sequence of Bernoulli
trials, when the probability of success is p.
The probability distribution is given by:

The cumulative distribution function is as follows:

Input Parameters
Name |
Type |
Description |
|---|---|---|
method |
|
Generation method. The specific values are as follows: |
a |
|
The first distribution parameter |
p |
|
The second distribution parameter |
Parent topic: Distributions