Package qa.generator.distributions
Class QADistribution
java.lang.Object
qa.generator.distributions.QADistribution
- Direct Known Subclasses:
QACorrelatedSequence
,QAFixed
,QAGamma
,QAGaussian
,QARandomSpread
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getRange()
Get the range of the distrubution.abstract double[]
getRange
(double nSigma) Get the range of the distrubution.final double[]
getValues
(int nValues) Create a set of random values according to the underlying distribution.boolean
boolean
isSort()
void
setIntegrate
(boolean integrate) void
setSort
(boolean sort)
-
Constructor Details
-
QADistribution
public QADistribution(boolean sort, boolean integrate) - Parameters:
sort
- sort the data in ascending order.integrate
- data will be integrated (e.g. to generate click times rather than inter-click intervals)
-
-
Method Details
-
getValues
public final double[] getValues(int nValues) Create a set of random values according to the underlying distribution.Concrete classes should override createValues rather than this getValues function, leaving getValues to sort and integrate as required
- Parameters:
nValues
- number of values to generate.- Returns:
- array of values.
-
getRange
public abstract double[] getRange(double nSigma) Get the range of the distrubution. How this is defined is a little nebulous, for Guassian like distributions its the mean +/- n standard deviations.- Parameters:
nSigma
- number of Standard Deviations (or equivalents).- Returns:
- The range of values.
-
getRange
public double[] getRange()Get the range of the distrubution. How this is defined is a little nebulous, for Guassian like distributions its the mean +/- n standard deviations.- Parameters:
nSDs
- number of Standard Deviations (or equivalents).- Returns:
- The range of values.
-
isSort
public boolean isSort()- Returns:
- the sort
-
setSort
public void setSort(boolean sort) - Parameters:
sort
- the sort to set
-
isIntegrate
public boolean isIntegrate()- Returns:
- the integrate
-
setIntegrate
public void setIntegrate(boolean integrate) - Parameters:
integrate
- the integrate to set
-