public class DenseContPhaseVar extends AbstractContPhaseVar
Constructor and Description |
---|
DenseContPhaseVar()
Constructs an empty continuous Phase-type Distribution
with dense representation
|
DenseContPhaseVar(no.uib.cipr.matrix.DenseVector alpha,
no.uib.cipr.matrix.DenseMatrix A)
Constructs a continuous Phase-type Distribution
with dense representation
|
DenseContPhaseVar(double[] alpha,
double[][] A)
Constructs a continuous Phase-type Distribution
with dense representation
|
DenseContPhaseVar(int n)
Constructs an empty Continuous Phase-type Distribution
of size n with dense representation
|
DenseContPhaseVar(no.uib.cipr.matrix.Vector alpha,
no.uib.cipr.matrix.Matrix A)
Constructs a continuous Phase-type Distribution
with dense representation
|
Modifier and Type | Method and Description |
---|---|
ContPhaseVar |
copy()
Creates a deep copy of the original Phase-Type Variable
|
static DenseContPhaseVar |
Coxian(int n,
double[] lambdas,
double[] probs)
Constructs a Phase-Type representation of a Coxian
distribution with n phases
|
static DenseContPhaseVar |
Erlang(double lambda,
int n)
Constructs a Phase-Type representation of an Erlang
distribution with rate lambda and n exponential phases
|
static DenseContPhaseVar |
ErlangCoxian(int n,
double p,
double lambdaY,
double lambdaX1,
double lambdaX2,
double px)
Constructs a Phase-Type representation of an ErlangCoxian
distribution as defined by Osogami and Harchol in "Closed
form solutions for mapping general distributions to
quasi-minimal PH distributions", 2005.
|
static DenseContPhaseVar |
expo(double lambda)
Constructs a Phase-Type representation of an Exponential
distribution with rate lambda
|
no.uib.cipr.matrix.Matrix |
getMatrix()
Returns the transition matrix of the Phase-Type Distribution
|
no.uib.cipr.matrix.Vector |
getVector()
Returns the initial probability mass vector
|
static DenseContPhaseVar |
HipoExponential(double[] lambdas) |
static DenseContPhaseVar |
HyperErlang(HyperErlangVar var)
Constructs a Phase-Type representation of a Hyper-Erlang
distribution from a Dense representation of the same
distribution
|
static DenseContPhaseVar |
HyperErlang(int k,
double[] lambdas,
int[] n,
double[] probs)
Constructs a Phase-Type representation of a Hyper-Erlang
distribution with k erlang branches, its k rates and n number
of phases per branch
|
static DenseContPhaseVar |
HyperExpo(double[] lambdas,
double[] probs)
Constructs a Phase Distribution that represents
a HyperExponential distribution with the especified parameters
|
ContPhaseVar |
newVar(int n)
Creates a new variable of the same class of the original
Continuous Phase-Type Variable
|
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, expectedValue, getMat0, getMat0Array, getMatrixArray, getNumPhases, 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
equals
public DenseContPhaseVar()
public DenseContPhaseVar(int n)
n
- size of the Continuous Phase-type Distributionpublic DenseContPhaseVar(no.uib.cipr.matrix.DenseVector alpha, no.uib.cipr.matrix.DenseMatrix A)
A
- rate matrixalpha
- initial probability distribution vectorpublic DenseContPhaseVar(no.uib.cipr.matrix.Vector alpha, no.uib.cipr.matrix.Matrix A)
A
- rate matrixalpha
- initial probability distribution vectorpublic DenseContPhaseVar(double[] alpha, double[][] A)
A
- rate matrixalpha
- initial probability distribution vectorpublic static DenseContPhaseVar expo(double lambda)
lambda
- exponential distribution ratepublic static DenseContPhaseVar Erlang(double lambda, int n)
lambda
- exponential rate in each phasen
- number of exponential phasespublic static DenseContPhaseVar HipoExponential(double[] lambdas)
public static DenseContPhaseVar HyperExpo(double[] lambdas, double[] probs)
lambdas
- ecah one of the exponential ratesprobs
- initial probability vectorpublic static DenseContPhaseVar HyperErlang(int k, double[] lambdas, int[] n, double[] probs)
k
- number of Erlang brancheslambdas
- exponential rate of each phase in each branchn
- number of exponential phases in each branchprobs
- probability distribution of taking each one of the branchespublic static DenseContPhaseVar HyperErlang(HyperErlangVar var)
var
- HyperErlang variable from which the Dense
Continuous variable must be constructedpublic static DenseContPhaseVar Coxian(int n, double[] lambdas, double[] probs)
n
- number of phaseslambdas
- exponential rates of each phaseprobs
- probability of going to the next phase
(no absorption) in each phase except the last one.public static DenseContPhaseVar ErlangCoxian(int n, double p, double lambdaY, double lambdaX1, double lambdaX2, double px)
n
- total number of phases (Erlang degree: n-2)p
- probability of having a positive elapse time
in the distribution. 1-p: mass probability at zerolambdaY
- rate of the Erlang distributionlambdaX1
- rate of the first stage of the Coxian
distributionlambdaX2
- rate of the second stage of the Coxian
distributionpx
- probability of going from the first to the second
stage in the Coxian distribution. 1-p: probability of
absorption at the first stage of the Coxian distributionpublic no.uib.cipr.matrix.Matrix getMatrix()
PhaseVar
public no.uib.cipr.matrix.Vector getVector()
PhaseVar
public void setMatrix(no.uib.cipr.matrix.Matrix A)
PhaseVar
A
- Transition matrix for the transient states of the
Phase-Type Distributionpublic void setVector(no.uib.cipr.matrix.Vector alpha)
PhaseVar
alpha
- Initial probability mass vectorpublic ContPhaseVar copy()
ContPhaseVar
public ContPhaseVar newVar(int n)
ContPhaseVar
n
- number of Phases of the new Variable