randhypergeometricreference() - randhypergeometricreference() - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 English
void SRANDHYPERGEOMETRICREFERENCE(rng_int_t *np, rng_int_t *ns, rng_int_t *m, float *ref, rng_int_t *lref, rng_int_t *info)#
void DRANDHYPERGEOMETRICREFERENCE(rng_int_t *np, rng_int_t *ns, rng_int_t *m, double *ref, rng_int_t *lref, rng_int_t *info)#
void srandhypergeometricreference_(rng_int_t *np, rng_int_t *ns, rng_int_t *m, float *ref, rng_int_t *lref, rng_int_t *info)#
void drandhypergeometricreference_(rng_int_t *np, rng_int_t *ns, rng_int_t *m, double *ref, rng_int_t *lref, rng_int_t *info)#
void srandhypergeometricreference(rng_int_t np, rng_int_t ns, rng_int_t m, float *ref, rng_int_t *lref, rng_int_t *info)#
void drandhypergeometricreference(rng_int_t np, rng_int_t ns, rng_int_t m, double *ref, rng_int_t *lref, rng_int_t *info)#

Setsup a double precision reference vector for generating a vector of random variates from a hypergeometric distribution via calls to drandgeneraldiscrete.

Parameters:
  • np – [in] Size of the population, np >= 0

  • ns – [in] Size of the sample, 0 <= ns <= np

  • m – [in] Number of ‘specified’ items in the population, 0 <= m <= np

  • ref – [out] Reference vector, ref(lref)

  • lref – [inout] On Entry: Either -1, or Length of ref. lref >= complicated formula On Exit: If lref = -1 then lref is set to a recommended value and the function returns; otherwise, lref is not altered

  • info – [out]

    Error code

    1 = Everything OK, but reference vector not set up, due to lref being -1 on entry

    0 = Everything OK

    -1 to -5 = Error in parameter, abs(info)