See Devroye "Non-Uniform Random Variate Generation" Section IX.3.2 (it is freely available online). Several algorithms are explained in detail there with pseudo-code, so it will be quick to code.
\-- Monseigneur Myriel
See Devroye "Non-Uniform Random Variate Generation" Section IX.3.2 (it is freely available online). Several algorithms are explained in detail there with pseudo-code, so it will be quick to code.
\-- Monseigneur Myriel