Class Replayer
java.lang.Object
random.AbstractDistribution
random.Replayer
- All Implemented Interfaces:
Distribution, StorableDistribution
Replays cyclically data, previously generated, reading them from a file.
- Version:
- Date: 23-lug-2003 Time: 17.28.35
- Author:
- Federico Granata, Modified by Stefano Omini, 12/5/2004
-
Field Summary
Fields inherited from class AbstractDistribution
engine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleThis method is used to obtain from the distribution its cumulative distribution function evaluated where required by the user.doubleReads a new data from the file.doubleThis method is used to obtain from the distribution its probability distribution function evaluated where required by the user.doubleThis method is used to obtain from the distribution the value of its own theoretic mean.doubleThis method is used to obtain from the distribution the value of its own theoretic variance.Methods inherited from class AbstractDistribution
setRandomEngineMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Distribution
setRandomEngine
-
Constructor Details
-
Replayer
public Replayer()Constructs a new distribution with standard random engine.
-
-
Method Details
-
nextRand
Reads a new data from the file.- Specified by:
nextRandin interfaceDistribution- Parameters:
p- parameter of the distribution.- Returns:
- double with the next random number from the sequence.
- Throws:
IncorrectDistributionParameterException- when the parameters r not consistent.
-
pdf
This method is used to obtain from the distribution its probability distribution function evaluated where required by the user.- Specified by:
pdfin interfaceDistribution- Parameters:
x- double indicating where to evaluate the pdf.p- parameter of the constant distribution.- Returns:
- double with the probability distribution function evaluated in x.
- Throws:
IncorrectDistributionParameterException
-
cdf
This method is used to obtain from the distribution its cumulative distribution function evaluated where required by the user.- Specified by:
cdfin interfaceDistribution- Parameters:
x- double indicating where to evaluate the cdf.p- parameter of the constant distribution.- Returns:
- double with the cumulative distribution function evaluated in x.
- Throws:
IncorrectDistributionParameterException
-
theorMean
This method is used to obtain from the distribution the value of its own theoretic mean.- Specified by:
theorMeanin interfaceDistribution- Parameters:
p- parameter of the constant distribution.- Returns:
- double with the theoretic mean of the distribution.
- Throws:
IncorrectDistributionParameterException
-
theorVariance
This method is used to obtain from the distribution the value of its own theoretic variance.- Specified by:
theorVariancein interfaceDistribution- Parameters:
p- parameter of the constant distribution.- Returns:
- double with the theoretic variance of the distribution.
- Throws:
IncorrectDistributionParameterException
-