Class UniformPar
java.lang.Object
random.AbstractParameter
random.UniformPar
This is the parameter that should be passed to the Uniform
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
ConstructorsConstructorDescriptionUniformPar(double min, double max) It creates a new uniform parameter using the bounds provided by the user.UniformPar(Double wmin, Double wmax) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It verifies if the parameter is correct.doublegetMax()It returns the value of the maximum bound of the uniform distribution.doublegetMin()It returns the value of the minimum bound of the uniform distribution.voidsetMax(double max) It allows the user to change the maximum bound of the uniform distribution and verifies if it is correct.voidsetMean(double value) Sets mean for a given distribution parameter.voidsetMin(double min) It allows the user to change the minimum bound of the uniform distribution and verifies if it is correct.
-
Constructor Details
-
UniformPar
It creates a new uniform parameter using the bounds provided by the user.- Parameters:
min- double containing the minimum bound of the uniform distribution.max- double containing the maximum bound of the uniform distribution.- Throws:
IncorrectDistributionParameterException- if the bounds are incorrect.
-
UniformPar
-
-
Method Details
-
check
public boolean check()It verifies if the parameter is correct. For the uniform distribution the parameter is right if the bounds are right which means that max must be greater than min. -
getMin
public double getMin()It returns the value of the minimum bound of the uniform distribution.- Returns:
- double with the minimum bound of the distribution.
-
getMax
public double getMax()It returns the value of the maximum bound of the uniform distribution.- Returns:
- double with the maximum bound of the distribution.
-
setMin
It allows the user to change the minimum bound of the uniform distribution and verifies if it is correct.- Parameters:
min- double indicating the new value of the minimum bound.- Throws:
IncorrectDistributionParameterException- if the provided value is not less than the maximum bound value.
-
setMax
It allows the user to change the maximum bound of the uniform distribution and verifies if it is correct.- Parameters:
max- double indicating the new value of the maximum bound.- Throws:
IncorrectDistributionParameterException- if the provided value is not greater than the minimum bound value.
-
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.
-