There is something I didn't understand. I use the sample given from the cpp reference to generate numbers:
1 2 3 4 5 6 7 8 9
constint nrolls = 10; // number of experiments
std::default_random_engine generator;
std::poisson_distribution<int> distribution(4.1);
for (int i=0; i<nrolls; ++i){
int number = distribution(generator);
cout<<number<<" "<<endl;
}
This outputs: 2 3 1 4 3 4 4 3 2 3 and so on... First of all what those numbers mean? I mean do I have to sum them to create timing? For example: 2, (2+3)=5, (5+1)=6, (6+4)=10,..., and so on..
Secondly, my real question is, I need to produce both random arrivals for network packets and the size of packets. I mean, when the packets come and if packets come, what are the size of packets? How can I do that? I need something like that: http://i.hizliresim.com/dWmaGX.png
> std::poisson_distribution<int> distribution(4.1) ;
> This outputs: 2 3 1 4 3 4 4 3 2 3 and so on... First of all what those numbers mean?
It is the number of events (in this case number of packets arriving) per unit time (say, in each second), if the expected value (average) of the number of packets arriving per unit time (per second) is 4.1. https://en.wikipedia.org/wiki/Poisson_distribution
> when the packets come and if packets come, what are the size of packets?
Use an appropriate truncated distribution, bounded in the range (minimum packet size, maximum packet size). For instance we can (crudely) simulate a truncated normal distribution by discarding samples that lie outside the range