Class GammaDistrPar
java.lang.Object
random.AbstractParameter
random.GammaDistrPar
This is the parameter that should be passed to the Gamma
distribution.
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
- Author:
- Fabrizio Frontera - ffrontera@yahoo.it
-
Constructor Summary
ConstructorsConstructorDescriptionGammaDistrPar(double alpha, double lambda) It creates a new gamma parameter according to the value provided by the user.GammaDistrPar(Double walpha, Double wlambda) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It controls if the parameters are correct or not.doublegetAlpha()It returns the value of the parameter alpha of the gamma distribution.doubleIt returns the value of the parameter lambda of the gamma distribution.voidsetAlpha(double alpha) It allows the user to modify the value of the parameter alpha of the gamma distribution.voidsetLambda(double lambda) It allows the user to modify the value of the parameter lambda of the gamma distribution.voidsetMean(double value) Sets mean for a given distribution parameter.
-
Constructor Details
-
GammaDistrPar
It creates a new gamma parameter according to the value provided by the user.- Parameters:
alpha- double containing the parameter alpha of the gamma distribution.lambda- double containing the parameter lambda of the gamma distribution.- Throws:
IncorrectDistributionParameterException- if alpha or lambda is not greater than zero.
-
GammaDistrPar
-
-
Method Details
-
check
public boolean check()It controls if the parameters are correct or not. For the gamma distribution, the parameters are right if they are both greater than zero. -
getAlpha
public double getAlpha()It returns the value of the parameter alpha of the gamma distribution.- Returns:
- double with alpha.
-
getLambda
public double getLambda()It returns the value of the parameter lambda of the gamma distribution.- Returns:
- double with lambda.
-
setAlpha
It allows the user to modify the value of the parameter alpha of the gamma distribution. It verifies if the new value is correct, that is if alpha is greater than zero.- Parameters:
alpha- double indicating the new value of the parameter alpha.- Throws:
IncorrectDistributionParameterException- if the value provided is not greater than zero.
-
setLambda
It allows the user to modify the value of the parameter lambda of the gamma distribution. It verifies if the new value is correct, that is if lambda is greater than zero.- Parameters:
lambda- double indicating the new value of the parameter lambda.- Throws:
IncorrectDistributionParameterException- if the value provided 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.
-