public class NormalTimeDistribution extends java.lang.Object implements PacketTimeDistribution
| Constructor and Description |
|---|
NormalTimeDistribution()
Creates a new NormalTimeDistribution with a mean of 0.0 and a standard
deviation of 1.0 (a standard normal distribution).
|
NormalTimeDistribution(double mean)
Creates a new NormalTimeDistribution with the specified mean and a
standard deviation of 1.0.
|
NormalTimeDistribution(double mean,
double standardDeviation)
Creates a new NormalTimeDistribution with the specified mean and standard
deviation.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getMean() |
double |
getStandardDeviation() |
int |
getType() |
int |
nextInterval() |
int[] |
prediction(int size)
Generates an array containing predicted packet transmission times, in
terms of number of ms from this instant.
|
void |
setMean(double newMean)
Sets the mean value for inter-arrival times generated by this normal time
distribution to the specified value.
|
void |
setStandardDeviation(double newStandardDeviation)
Sets the standard deviation for inter-arrival times generated by this
normal time distribution to the specified value.
|
public NormalTimeDistribution()
public NormalTimeDistribution(double mean)
public NormalTimeDistribution(double mean,
double standardDeviation)
public double getMean()
public void setMean(double newMean)
public double getStandardDeviation()
public void setStandardDeviation(double newStandardDeviation)
public int getType()
getType in interface PacketTimeDistributionpublic int nextInterval()
nextInterval in interface PacketTimeDistributionpublic int[] prediction(int size)
PacketTimeDistributionprediction in interface PacketTimeDistributionsize - the number of predictions contained in the returned array