An Efficient Method for Generating Discrete Random Variables with General Distributions | Synapse