public class HypoExponentialVar extends AbstractContPhaseVar implements PhaseVar
Constructor and Description |
---|
HypoExponentialVar()
Constructor of a hypoexponential variable in dense representation.
|
HypoExponentialVar(double[] lambdas)
Constructor of a hypoexponential variable in dense representation
|
HypoExponentialVar(int n)
Constructor of a hypoexponential variable with n phases
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[][] |
getDMatrix() |
double[] |
getDVector() |
double[] |
getLambdas()
Return the rates associated to each branch
|
no.uib.cipr.matrix.Matrix |
getMatrix()
Returns the transition matrix of the Phase-Type Distribution
|
int |
getNumPhases()
Returns the number of phases of the Phase-type distribution
|
no.uib.cipr.matrix.Vector |
getVector()
Returns the initial probability mass vector
|
ContPhaseVar |
newVar(int n)
Creates a new variable of the same class of the original
Continuous Phase-Type Variable
|
void |
setLambdas(double[] lambdas)
Sets the rates associated to each branch
|
void |
setMatrix(no.uib.cipr.matrix.Matrix A)
Sets the transition matrix of the Phase-type distribution to be A
|
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, moment, 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, moment, prob, quantil, stdDeviation, survival, survival, variance
description, equals, label, toString
public HypoExponentialVar()
public HypoExponentialVar(int n)
n
- Total number of phasespublic HypoExponentialVar(double[] lambdas)
lambdas
- Rate associated to each branchpublic 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()