public class HyperErlangVar extends AbstractContPhaseVar implements PhaseVar
Constructor and Description |
---|
HyperErlangVar()
Constructor of a Hyper Erlang variable in dense representation.
|
HyperErlangVar(int n)
Constructor of a Hyper Erlang variable with n phases
in dense representation
|
HyperErlangVar(int[] r,
double[] alphas,
double[] lambdas,
boolean deep)
Constructor of a Hyper Erlang variable in dense representation
|
HyperErlangVar(int N,
int M,
int[] r,
double[] alphas,
double[] lambdas,
boolean deep)
Constructor of a Hyper Erlang variable in dense representation
|
Modifier and Type | Method and Description |
---|---|
ContPhaseVar |
copy()
Creates a deep copy of the original Phase-type variable
|
double |
expectedValue()
Computes the Expected Value of the Phase-type variable
|
double[] |
getAlphas() |
double[][] |
getDMatrix()
Returns the Double MAtrix that represents the variable
|
double[] |
getDVector()
Returns the Double MAtrix that represents the variable
|
double[] |
getLambdas() |
int |
getM() |
no.uib.cipr.matrix.Matrix |
getMatrix()
Returns the transition matrix of the Phase-Type Distribution
|
int |
getN() |
int |
getNumPhases()
Returns the number of phases of the Phase-type distribution
|
int[] |
getR() |
no.uib.cipr.matrix.Vector |
getVector()
Returns the initial probability mass vector
|
double |
moment(int k)
Compuetes the k-th Moment of the Phase-type variable
|
ContPhaseVar |
newVar(int n)
Creates a new variable of the same class of the original
Continuous Phase-Type Variable
|
void |
setAlphas(double[] alphas) |
void |
setLambdas(double[] lambdas) |
void |
setM(int M) |
void |
setMatrix(no.uib.cipr.matrix.Matrix A)
Sets the transition matrix of the Phase-type distribution to be A
|
void |
setN(int N) |
void |
setR(int[] r) |
void |
setVector(no.uib.cipr.matrix.Vector alpha)
Sets the initial probability vector to be alpha
|
cdf, cdf, CV, description, eqResidualTime, getMat0, getMat0Array, getMatrixArray, getVec0, getVectorArray, label, lossFunction1, lossFunction2, max, max, median, min, min, mix, mix, pdf, pdf, prob, quantil, residualTime, residualVar, stdDeviation, sum, sum, sumGeom, sumPH, sumPH, survival, survival, times, toString, variance, waitingQ
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
cdf, cdf, CV, getMat0, getMat0Array, getMatrixArray, getVec0, getVectorArray, lossFunction1, lossFunction2, median, prob, quantil, stdDeviation, survival, survival, variance
description, equals, label, toString
public HyperErlangVar()
public HyperErlangVar(int n)
n
- Total number of phasespublic HyperErlangVar(int N, int M, int[] r, double[] alphas, double[] lambdas, boolean deep)
N
- Total number of phasesM
- Number of branchesr
- Number of phases in each branchalphas
- Probability associated to each branchlambdas
- Rate associated to each branchdeep
- True if this is a deep constructor, false if notpublic HyperErlangVar(int[] r, double[] alphas, double[] lambdas, boolean deep)
r
- Number of phases in each branchalphas
- Probability associated to each branchlambdas
- Rate associated to each branchdeep
- True if this is a deep constructor, false if notpublic int getN()
public void setN(int N)
N
- Total number of phases to setpublic int getM()
public void setM(int M)
M
- Number of branches to setpublic int[] getR()
public void setR(int[] r)
r
- Number of phases in each branch to setpublic double[] getAlphas()
public void setAlphas(double[] alphas)
alphas
- Probability associated to each branch to setpublic double[] getLambdas()
public void setLambdas(double[] lambdas)
lambdas
- Rates associated to each branch to setpublic no.uib.cipr.matrix.Matrix getMatrix()
PhaseVar
public double[][] getDMatrix()
public void setMatrix(no.uib.cipr.matrix.Matrix A)
PhaseVar
public no.uib.cipr.matrix.Vector getVector()
PhaseVar
public double[] getDVector()
public void setVector(no.uib.cipr.matrix.Vector alpha)
PhaseVar
public ContPhaseVar copy()
PhaseVar
copy
in interface ContPhaseVar
copy
in interface PhaseVar
public ContPhaseVar newVar(int n)
ContPhaseVar
newVar
in interface ContPhaseVar
n
- number of Phases of the new Variablepublic int getNumPhases()
PhaseVar
getNumPhases
in interface PhaseVar
getNumPhases
in class AbstractContPhaseVar
PhaseVar.getNumPhases()
public double expectedValue()
PhaseVar
expectedValue
in interface PhaseVar
expectedValue
in class AbstractContPhaseVar
PhaseVar.expectedValue()
public double moment(int k)
PhaseVar
moment
in interface PhaseVar
moment
in class AbstractContPhaseVar
k
- Moment to computePhaseVar.moment(int)