|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjphase.AbstractContPhaseVar
jphase.DenseContPhaseVar
public class DenseContPhaseVar
This class allows the creation and manipulation of Continuous Phase-type distributions represented by dense matrices.
Field Summary | |
---|---|
protected no.uib.cipr.matrix.DenseMatrix |
A
Rate Matrix |
protected no.uib.cipr.matrix.DenseVector |
alpha
Initial Probability distribution vector |
Constructor Summary | |
---|---|
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)
Construcs 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 |
Method Summary | |
---|---|
ContPhaseVar |
copy()
Creates a deep copy of the original Phase-Type Variable |
static DenseContPhaseVar |
Coxian(int n,
double[] lambdas,
double[] probs)
Construcs 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)
Construcs 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 |
HyperErlang(HyperErlangVar var)
Construcs 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)
Rate Matrix = A |
void |
setVector(no.uib.cipr.matrix.Vector alpha)
Initial Probability vector = alpha |
Methods inherited from class jphase.AbstractContPhaseVar |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmarkov.basic.JMarkovElement |
---|
equals |
Field Detail |
---|
protected no.uib.cipr.matrix.DenseMatrix A
protected no.uib.cipr.matrix.DenseVector alpha
Constructor Detail |
---|
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 vectorMethod Detail |
---|
public static DenseContPhaseVar expo(double lambda)
lambda
- exponential distribution rate
public static DenseContPhaseVar Erlang(double lambda, int n)
lambda
- exponential rate in each phasen
- number of exponential phases
public static DenseContPhaseVar HyperExpo(double[] lambdas, double[] probs)
lambdas
- ecah one of the exponential ratesprobs
- initial probability vector
public 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 branches
public static DenseContPhaseVar HyperErlang(HyperErlangVar var)
var
- HyperErlang variable from which the Dense
Continuous variable must be constructed
public 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 distribution
public 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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |