Class PoissonPar
java.lang.Object
random.AbstractParameter
random.PoissonPar
This is the parameter that should be passed to the Poisson
distribution.
- Author:
- Leran Chen - 01/09/2021
-
Constructor Summary
ConstructorsConstructorDescriptionPoissonPar(double lambda) It creates a new Poisson parameter with the mean provided by the user.PoissonPar(Double wmean) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It controls if the parameter is correct or not.doubleIt returns the value of the parameter lambda of the Poisson distribution.voidsetLambda(double lambda) It allows the user to modify the value of the parameter lambda of the Poisson distribution and verify if the value is correct that is if it is greater than zero.voidsetMean(double value) Sets mean for a given distribution parameter.
-
Constructor Details
-
PoissonPar
It creates a new Poisson parameter with the mean provided by the user.- Parameters:
lambda- double containing the parameter lambda.- Throws:
IncorrectDistributionParameterException- if the value provided is not greater than zero.
-
PoissonPar
-
-
Method Details
-
check
public boolean check()It controls if the parameter is correct or not. For the Poisson distribution, the parameter is correct if the lambda is greater than zero. -
getLambda
public double getLambda()It returns the value of the parameter lambda of the Poisson distribution.- Returns:
- double with lambda.
-
setLambda
It allows the user to modify the value of the parameter lambda of the Poisson distribution and verify if the value is correct that is if it is greater than zero.- Parameters:
lambda- double indicating the new value of the parameter lambda.- Throws:
IncorrectDistributionParameterException- if the provided value is not greater than zero.
-
setMean
Sets mean for a given distribution parameter. This method is required to adjust the mean value of a distribution into Load Dependent Service Time Strategy.
Author: Bertoli Marco- Specified by:
setMeanin interfaceParameter- Overrides:
setMeanin classAbstractParameter- Parameters:
value- New mean value for this distribution.- Throws:
IncorrectDistributionParameterException- if mean value is invalid for this distribution.
-