Method

NumCosmoMathRNGmultinomial

Declaration [src]

void
ncm_rng_multinomial (
  NcmRNG* rng,
  gsize K,
  guint N,
  const gdouble* p,
  guint* n
)

Description [src]

This function fills the array n with K elements using a multinomial distribution defined by the array p.

Parameters

K

Type: gsize

Number of possible outcomes.

N

Type: guint

Number of trials.

p

Type: An array of double

Array of probabilities.

The length of the array is specified in the K argument.
The data is owned by the caller of the method.
n

Type: An array of guint

Array of counts.

The length of the array is specified in the K argument.
The data is owned by the caller of the method.