Class Det
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Det extends Distribution implements Serializable
A Deterministic distribution taking a single constant value.
-
-
Constructor Summary
Constructors Constructor Description Det(double t)Creates a deterministic distribution with the specified constant value.
-
Method Summary
Modifier and Type Method Description static DetfitMean(double mean)Creates a deterministic distribution with the specified mean value. doubleevalCDF(double t)Evaluates the cumulative distribution function at the given point. doubleevalLST(double s)Evaluates the Laplace-Stieltjes transform at the given point. doublegetMean()Gets the mean of this deterministic distribution. voidsetMean(double t)Sets the mean (constant value) of this deterministic distribution. doublegetMu()Gets the rate (inverse of the constant value). doublegetPhi()Gets the phase parameter. Map<Integer, Matrix>getProcess()Gets the matrix representation of this deterministic process. voidsetProcess(Map<Integer, Matrix> proc)Sets the matrix representation of this deterministic process. doublegetRate()Gets the rate of this deterministic distribution. doublegetSCV()Gets the squared coefficient of variation. doublegetSkewness()Gets the skewness of this deterministic distribution. doublegetVar()Gets the variance of this deterministic distribution. booleanisContinuous()Checks if this is a continuous distribution. booleanisDisabled()Checks if this is a disabled distribution. booleanisDiscrete()Checks if this is a discrete distribution. booleanisImmediate()Checks if this distribution has immediate (zero) service time. Array<double>sample(int n)Generates random samples from this distribution using default random generator. Array<double>sample(int n, Random random)Generates random samples from this distribution using the specified random generator. doublemu()Kotlin-style property alias for getMu() doublephi()Kotlin-style property alias for getPhi() Map<Integer, Matrix>process()Kotlin-style property alias for getProcess() doublemean()Kotlin-style property alias for getMean() doublerate()Kotlin-style property alias for getRate() doublescv()Kotlin-style property alias for getSCV() doubleskewness()Kotlin-style property alias for getSkewness() doublevar()Kotlin-style property alias for getVar() -
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isMarkovian, name, numParams, param, setNumParams, setParam, support -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
fitMean
static Det fitMean(double mean)
Creates a deterministic distribution with the specified mean value. This is equivalent to new Det(mean).
- Parameters:
mean- the mean value for the deterministic distribution- Returns:
a new Det distribution with the specified mean
-
evalCDF
double evalCDF(double t)
Evaluates the cumulative distribution function at the given point. Returns 0 if t <value, 1 if t >= value.
- Parameters:
t- the point at which to evaluate the CDF- Returns:
0 or 1 depending on whether t has reached the deterministic value
-
evalLST
double evalLST(double s)
Evaluates the Laplace-Stieltjes transform at the given point.
- Parameters:
s- the transform variable- Returns:
e^(-s*t) where t is the deterministic value
-
getMean
double getMean()
Gets the mean of this deterministic distribution.
- Returns:
the constant value of the distribution
-
setMean
void setMean(double t)
Sets the mean (constant value) of this deterministic distribution.
- Parameters:
t- the new constant value
-
getMu
double getMu()
Gets the rate (inverse of the constant value).
- Returns:
1/t where t is the deterministic value
-
getPhi
double getPhi()
Gets the phase parameter.
- Returns:
always returns 1 for deterministic distribution
-
getProcess
Map<Integer, Matrix> getProcess()
Gets the matrix representation of this deterministic process.
- Returns:
map containing the process matrices
-
setProcess
void setProcess(Map<Integer, Matrix> proc)
Sets the matrix representation of this deterministic process.
- Parameters:
proc- the process matrices to set
-
getRate
double getRate()
Gets the rate of this deterministic distribution.
- Returns:
1/t where t is the deterministic value
-
getSCV
double getSCV()
Gets the squared coefficient of variation. For deterministic distribution, SCV = 0 (no variance).
- Returns:
always returns 0
-
getSkewness
double getSkewness()
Gets the skewness of this deterministic distribution.
- Returns:
always returns 0 (no skewness)
-
getVar
double getVar()
Gets the variance of this deterministic distribution.
- Returns:
always returns 0 (no variance)
-
isContinuous
boolean isContinuous()
Checks if this is a continuous distribution.
- Returns:
true if this is a continuous distribution, false otherwise
-
isDisabled
boolean isDisabled()
Checks if this is a disabled distribution.
- Returns:
true if this is a disabled distribution, false otherwise
-
isDiscrete
boolean isDiscrete()
Checks if this is a discrete distribution.
- Returns:
true if this is a discrete distribution, false otherwise
-
isImmediate
boolean isImmediate()
Checks if this distribution has immediate (zero) service time.
- Returns:
true if the distribution is immediate or has mean <Zero threshold
-
sample
Array<double> sample(int n)
Generates random samples from this distribution using default random generator.
- Parameters:
n- the number of samples to generate- Returns:
array of random samples
-
sample
Array<double> sample(int n, Random random)
Generates random samples from this distribution using the specified random generator.
- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
array of random samples
-
mu
double mu()
Kotlin-style property alias for getMu()
-
phi
double phi()
Kotlin-style property alias for getPhi()
-
mean
double mean()
Kotlin-style property alias for getMean()
-
rate
double rate()
Kotlin-style property alias for getRate()
-
scv
double scv()
Kotlin-style property alias for getSCV()
-
skewness
double skewness()
Kotlin-style property alias for getSkewness()
-
var
double var()
Kotlin-style property alias for getVar()
-
-
-
-