Class ParetoPar
java.lang.Object
random.AbstractParameter
random.ParetoPar
This is the parameter that should be passed to the Pareto
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It controls if the parameter is correct.doublegetAlpha()It returns the value of the parameter alpha of the pareto distribution.doublegetK()It returns the value of the parameter k of the pareto distribution.voidsetAlpha(double alpha) It allows the user to change the value of the parameter alpha of the pareto distribution and verifies if alpha is greater than two.voidsetK(double k) It allows the user to change the value of the parameter k of the pareto distribution.voidsetMean(double value) Sets mean for a given distribution parameter.
-
Constructor Details
-
ParetoPar
It creates a new pareto parameter according to the data provided by the user: the parameter alpha and k of the pareto distribution.- Parameters:
alpha- double containing the parameter alpha of the pareto distribution.k- double containing the parameter k of the pareto distribution.- Throws:
IncorrectDistributionParameterException- if alpha is not greater than two or k is not greater than zero.
-
ParetoPar
-
-
Method Details
-
check
public boolean check()It controls if the parameter is correct. For the pareto distribution, the parameter is right if alpha is greater than two and k is greater than zero. -
getAlpha
public double getAlpha()It returns the value of the parameter alpha of the pareto distribution.- Returns:
- double with the parameter alpha of the pareto distribution.
-
getK
public double getK()It returns the value of the parameter k of the pareto distribution.- Returns:
- double with the parameter k of the pareto distribution.
-
setAlpha
It allows the user to change the value of the parameter alpha of the pareto distribution and verifies if alpha is greater than two.- Parameters:
alpha- double indicating the parameter alpha of the pareto distribution.- Throws:
IncorrectDistributionParameterException- if alpha is not greater than two.
-
setK
It allows the user to change the value of the parameter k of the pareto distribution. It verifies if k is greater than zero.- Parameters:
k- double indicating the parameter k of the pareto distribution.- Throws:
IncorrectDistributionParameterException- if k 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.
-