> You may want to use Matsumoto's original C code for the Mersenne twister. It has a BSD license. Cool, thanks for the link. I appreciate the tip, although I do like the many distributions you have already built. >> Also, what about a multinomial function call that returns a single value, rather than an array of counts? > I don't understand what you mean. A multinomial variate must by definition be a vector. I meant: if you only request one sample from the multinomial, and then instead of a vector, you get back the index that would have been set to 1. |