-
void SRANDGENERALDISCRETE(rng_int_t *n, float *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
-
void DRANDGENERALDISCRETE(rng_int_t *n, double *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
-
void srandgeneraldiscrete_(rng_int_t *n, float *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
-
void drandgeneraldiscrete_(rng_int_t *n, double *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
-
void srandgeneraldiscrete(rng_int_t n, float *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
-
void drandgeneraldiscrete(rng_int_t n, double *ref, rng_int_t *state, rng_int_t *x, rng_int_t *info)#
Returns a vector of pseudo-random integers from a general discrete distribution
where the distribution is defined by the reference vector.
- Parameters:
n – [in] Number of integers to generate, n > 0
ref – [in] Reference vector as set up by one of the following APIs, drandbinomialreference, drandgeometricreference, drandhypergeometricreference, drandnegativebinomialreference, drandpoissonreference.
state – [inout] On Entry: Current state of the base generator being used. state must have first been initialized with a call to drandinitialize On Exit: State of generator after n- values are generated
x – [out] Vector of n- integers from the binomial distribution, x(n)
info – [out]
Error code
0 = Everything OK
-1 to -3 = Error in parameter, abs(info)