Class ExponentialPar
java.lang.Object
random.AbstractParameter
random.ExponentialPar
This is the parameter that should be passed to the Exponential
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
ConstructorsConstructorDescriptionIt creates a new empty exponential parameter that must be set to be used.ExponentialPar(double lambda) It creates a new exponential parameter using the value provided by the user.ExponentialPar(Double wlambda) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It controls if the parameter is correct or not.doubleIt returns the value of the parameter lambda of the exponential distribution.voidsetLambda(double lambda) It allows the user to modify the value of the parameter lambda of the exponential 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
-
ExponentialPar
public ExponentialPar()It creates a new empty exponential parameter that must be set to be used. -
ExponentialPar
It creates a new exponential parameter using the value provided by the user.- Parameters:
lambda- double containing the parameter lambda.- Throws:
IncorrectDistributionParameterException- if the value provided is not greater than zero.
-
ExponentialPar
-
-
Method Details
-
check
public boolean check()It controls if the parameter is correct or not. For the exponential distribution, the parameter is right if lambda is greater than zero. -
getLambda
public double getLambda()It returns the value of the parameter lambda of the exponential distribution.- Returns:
- double with lambda.
-
setLambda
It allows the user to modify the value of the parameter lambda of the exponential 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.
-