Original Question:
I want to generate a Poisson process. If the number of arrivals by time t is N(t) and I have a Poisson distribution with parameter lambda how do I generate N(t)? How would I do this in C++?
Clarification:
I originally wanted to generate the process using a Poisson distribution. But, I was confused about what parameter from the process I needed; I thought I could use N(t) but that tells me how many arrivals have occurred on the interval (0,t] which wasn't what I wanted. So, then I thought I could use N(t2)-N(t1) to get the number of arrivals on the interval [t1,t2]. Since N(t)~Poisson(t x lambda) I could use Poisson(t2 x lambda)-Poisson(t1 x lambda) but I don't want the number of arrivals in an interval.
Rather, I want to generate the explicit times that arrivals occur at.
I could do this by making the interval [t2,t1] sufficiently small so that each interval has only one arrival (which occurs as |t2-t1| -> 0).