Class LognormalPar
java.lang.Object
random.AbstractParameter
random.LognormalPar
This is the parameter that should be passed to the Normal
distribution.
Copyright (c) 2021
Imperial College London
Copyright (c) 2021
Imperial College London
- Author:
- Giuliano Casale, g.casale@imperial.ac.uk
-
Constructor Summary
ConstructorsConstructorDescriptionLognormalPar(double mu, double sigma) It creates a new normal parameter according to the data provided by the user: the mean and the standard deviation of the normal distribution.LognormalPar(Double wmu, Double wsigma) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It verifies that the parameter is correct.doublegetMu()It returns the value of the mean of the normal distribution.doublegetSigma()It returns the value of the standard deviation of the normal distribution.voidsetMu(double mu) It allows the user to change the value of the mean of the normal distribution.voidsetSigma(double sigma) It allows the user to change the value of the standard deviation of the normal distribution and verifies if it is greater than zero.Methods inherited from class AbstractParameter
setMean
-
Constructor Details
-
LognormalPar
It creates a new normal parameter according to the data provided by the user: the mean and the standard deviation of the normal distribution.- Parameters:
mu- double containing the mean of the normal distribution.sigma- double containing the standard deviation of the normal distribution.- Throws:
IncorrectDistributionParameterException- if the standard deviation is not greater than zero.
-
LognormalPar
-
-
Method Details
-
check
public boolean check()It verifies that the parameter is correct. For the normal distribution, the parameter is right if the standard deviation is greater than zero. -
getMu
public double getMu()It returns the value of the mean of the normal distribution.- Returns:
- double with the mean of the normal distribution.
-
getSigma
public double getSigma()It returns the value of the standard deviation of the normal distribution.- Returns:
- double with the standard deviation of the normal distribution.
-
setMu
It allows the user to change the value of the mean of the normal distribution.- Parameters:
mu- double indicating the mean of the normal distribution.- Throws:
IncorrectDistributionParameterException
-
setSigma
It allows the user to change the value of the standard deviation of the normal distribution and verifies if it is greater than zero.- Parameters:
sigma- double indicating the standard deviation of the normal distribution.- Throws:
IncorrectDistributionParameterException- if the standard deviation is not greater than zero.
-