I need to generate a hyperexponential distribution for my project. I have already implemented a poisson generating algorithm given by Donald Knuth, but I couldn't find an algorithm for generating a hyper exponential random variable.
I am provided with the mean and variance required of the distribution and I need an algorithm which can generate a random variable from this distribution when I execute it.