Opened 6 years ago

Closed 6 years ago

#857 closed request (fixed)

RNG from negative hypergeometric distribution

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.14
Component: random Version: trunk
Keywords: Cc:


Random number generation from the negative hypergeometric distribution.

It is not available in GSL (Random Number Distributions)

The special case with R=1 could be used in copy_k_of_n by draw a number from this class how many steps to iterate to next element of interest rather than at every element draw a Bernoulli number asking whether we should copy this element. Especially when k << n, this change would speed up things quite a bit.

Change History (2)

comment:1 Changed 6 years ago by Peter

Milestone: yat 0.x+yat 0.14
Owner: changed from Jari Häkkinen to Peter
Status: newassigned

comment:2 Changed 6 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [3469]) New class for NegativeHyperGeometric?. closes #857. The implementation is quite naive and calls RNG several times within one call, which might be something that can be improved. This code was inspired by gsl_ran_hypergeometric.

Note: See TracTickets for help on using tickets.