public abstract class AbstractDiscPhaseVar extends java.lang.Object implements DiscPhaseVar
| Constructor and Description |
|---|
AbstractDiscPhaseVar() |
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Evaluates the cumulative distribution function at x
|
double[] |
cdf(int n,
double delta)
Evaluates the cumulative distribution function at n values of x,
starting with x=0, step delta
|
double |
CV()
Computes the Coefficient of Variation
of the Phase-type variable
|
java.lang.String |
description()
This method return a complete verbal describtion of this element.
|
double |
expectedValue()
Computes the Expected Value of the Phase-type variable
|
no.uib.cipr.matrix.Vector |
getMat0()
Returns the exit vector from the transient states into absorption
|
double[] |
getMat0Array()
Returns the exit vector in double[] format
|
double[][] |
getMatrixArray()
Returns the transition matrix in double format
|
int |
getNumPhases()
Returns the number of phases of the Phase-type distribution
|
double |
getVec0()
Returns the probability mass at zero (alpha_0)
|
double[] |
getVectorArray()
Returns the initial probability
mass vector in double[] format
|
java.lang.String |
label()
This method returns a short String used in the user interface to describe
this element.
|
double |
lossFunction1(double x)
Evaluates the loss function of order 1
at x
|
double |
lossFunction2(double x)
Evaluates the loss function of order 2
at x
|
DiscPhaseVar |
max(DiscPhaseVar v2)
Returns the maximum between the variable B and
the original: res = max(A,B)
|
DiscPhaseVar |
max(DiscPhaseVar v2,
DiscPhaseVar res)
Returns the maximum between the variable B and
the original: res = max(A,B)
|
double |
median()
Computes the median of the distribution
|
DiscPhaseVar |
min(DiscPhaseVar v2)
Returns the minimum between the variable B and
the original: res = min(A,B)
|
DiscPhaseVar |
min(DiscPhaseVar v2,
DiscPhaseVar res)
Returns the minimum between the variable B and
the original: res = min(A,B)
|
DiscPhaseVar |
mix(double p,
DiscPhaseVar v2)
Computes the distribution of the mix:
res = A*p + B*(1-p)
|
DiscPhaseVar |
mix(double p,
DiscPhaseVar v2,
DiscPhaseVar res)
Computes the distribution of the mix:
res = A*p + B*(1-p)
|
double |
moment(int k)
Compuetes the k-th Moment of the Phase-type variable
|
double |
pmf(int k)
Evaluates the probability mass function at k
|
double[] |
pmf(int n,
int delta)
Evaluates the probability mass function at
n values of x, from zero to n times delta
|
double |
prob(double a,
double b)
Computes the probability that this variable
takes a value between a and b
|
double |
quantil(double p)
Computes the quantile q of the distribution,
such that F(q) = p
|
double |
stdDeviation()
Computes the Standard deviation of the Phase-type variable
|
DiscPhaseVar |
sum(DiscPhaseVar v2)
Computes the sum of variables: res = A +B
|
DiscPhaseVar |
sum(DiscPhaseVar v2,
DiscPhaseVar res)
Computes the sum of variables: res = A +B
|
DiscPhaseVar |
sumGeom(double p)
Returns the sum of a geometric number of
independent copies of this variable
|
DiscPhaseVar |
sumPH(DiscPhaseVar v2)
Returns the sum of a Phase-type-distributed number of Discrete Phase-type
distributions
|
DiscPhaseVar |
sumPH(DiscPhaseVar B,
DiscPhaseVar res)
Returns the sum of a Phase-type-distributed number of Discrete Phase-type
distributions
|
double |
survival(double x)
Evaluates the survival function at x
|
double[] |
survival(int n,
double delta)
Evaluates the survival function at n values of x,
starting with x=0, step delta
|
java.lang.String |
toString()
This method returns a short String used in the user interface to describe
this element.
|
double |
variance()
Computes the variance of the Phase-type variable
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, newVarequalspublic DiscPhaseVar sumPH(DiscPhaseVar B, DiscPhaseVar res)
DiscPhaseVarsumPH in interface DiscPhaseVarB - Discrete-Phase Type Distribution that determines
the number of Discrete Phase-Type Distributions to sumres - Discrete Phase Variable to store the resulting
distributionDiscPhaseVar.sumPH(jphase.DiscPhaseVar, jphase.DiscPhaseVar)public DiscPhaseVar sumPH(DiscPhaseVar v2)
DiscPhaseVarsumPH in interface DiscPhaseVarv2 - Discrete-Phase Type Distribution that determines
the number of Discrete Phase-Type Distributions to sumDiscPhaseVar.sumPH(jphase.DiscPhaseVar)public int getNumPhases()
PhaseVargetNumPhases in interface PhaseVarPhaseVar.getNumPhases()public double getVec0()
PhaseVargetVec0 in interface PhaseVarPhaseVar.getVec0()public no.uib.cipr.matrix.Vector getMat0()
PhaseVargetMat0 in interface PhaseVarPhaseVar.getMat0()public double[][] getMatrixArray()
PhaseVargetMatrixArray in interface PhaseVarPhaseVar.getMatrixArray()public double[] getVectorArray()
PhaseVargetVectorArray in interface PhaseVarPhaseVar.getVectorArray()public double[] getMat0Array()
PhaseVargetMat0Array in interface PhaseVarPhaseVar.getMat0Array()public double expectedValue()
PhaseVarexpectedValue in interface PhaseVarPhaseVar.expectedValue()public double variance()
PhaseVarvariance in interface PhaseVarPhaseVar.variance()public double stdDeviation()
PhaseVarstdDeviation in interface PhaseVarPhaseVar.stdDeviation()public double CV()
PhaseVarCV in interface PhaseVarPhaseVar.CV()public double moment(int k)
PhaseVarmoment in interface PhaseVark - Moment to computePhaseVar.moment(int)public double cdf(double x)
PhaseVarcdf in interface PhaseVarx - Evaluation pointPhaseVar.cdf(double)public double[] cdf(int n,
double delta)
PhaseVarcdf in interface PhaseVarn - number of evaluation pointsdelta - distance between evaluation pointsPhaseVar.cdf(int, double)public double pmf(int k)
DiscPhaseVarpmf in interface DiscPhaseVark - Evaluation pointDiscPhaseVar.pmf(int)public double[] pmf(int n,
int delta)
DiscPhaseVarpmf in interface DiscPhaseVarn - number of evaluation pointsdelta - distance between evaluation pointsDiscPhaseVar.pmf(int, int)public double prob(double a,
double b)
PhaseVarprob in interface PhaseVara - inferior limitb - superior limitPhaseVar.prob(double, double)public double survival(double x)
PhaseVarsurvival in interface PhaseVarx - Evaluation pointPhaseVar.survival(double)public double[] survival(int n,
double delta)
PhaseVarsurvival in interface PhaseVarn - number of evaluation pointsdelta - distance between evaluation pointsPhaseVar.survival(int, double)public double lossFunction1(double x)
PhaseVarlossFunction1 in interface PhaseVarx - Evaluation pointPhaseVar.lossFunction1(double)public double lossFunction2(double x)
PhaseVarlossFunction2 in interface PhaseVarx - Evaluation pointPhaseVar.lossFunction2(double)public double quantil(double p)
PhaseVarquantil in interface PhaseVarp - probability such that F(q) = pPhaseVar.quantil(double)public double median()
PhaseVarmedian in interface PhaseVarPhaseVar.median()public DiscPhaseVar sum(DiscPhaseVar v2, DiscPhaseVar res)
DiscPhaseVarsum in interface DiscPhaseVarv2 - Variable to sum to the originalres - Variable to store the resultDiscPhaseVar.sum(jphase.DiscPhaseVar, jphase.DiscPhaseVar)public DiscPhaseVar sum(DiscPhaseVar v2)
DiscPhaseVarsum in interface DiscPhaseVarv2 - Variable to sum to the originalDiscPhaseVar.sum(jphase.DiscPhaseVar)public DiscPhaseVar sumGeom(double p)
DiscPhaseVarsumGeom in interface DiscPhaseVarp - Parameter of the geometric variableDiscPhaseVar.sumGeom(double)public DiscPhaseVar mix(double p, DiscPhaseVar v2, DiscPhaseVar res)
DiscPhaseVarmix in interface DiscPhaseVarp - Portion of this variable in the mix (0<=p<=1)v2 - Variable to mix with the originalres - Variable to store the resulting distribution
with the same number of phases of the original
distributionDiscPhaseVar.mix(double, jphase.DiscPhaseVar, jphase.DiscPhaseVar)public DiscPhaseVar mix(double p, DiscPhaseVar v2)
DiscPhaseVarmix in interface DiscPhaseVarp - Portion of this variable in the mix (0<=p<=1)
with the same number of phases of the original
distributionv2 - Variable to mix with the originalDiscPhaseVar.mix(double, jphase.DiscPhaseVar)public DiscPhaseVar min(DiscPhaseVar v2, DiscPhaseVar res)
DiscPhaseVarmin in interface DiscPhaseVarv2 - Variable to compare with the originalres - Variable to store the resulting distributionDiscPhaseVar.min(jphase.DiscPhaseVar, jphase.DiscPhaseVar)public DiscPhaseVar min(DiscPhaseVar v2)
DiscPhaseVarmin in interface DiscPhaseVarv2 - Variable to compare with the originalDiscPhaseVar.min(jphase.DiscPhaseVar)public DiscPhaseVar max(DiscPhaseVar v2, DiscPhaseVar res)
DiscPhaseVarmax in interface DiscPhaseVarv2 - Variable to compare with the originalres - Variable to store the resulting distributionDiscPhaseVar.max(jphase.DiscPhaseVar, jphase.DiscPhaseVar)public DiscPhaseVar max(DiscPhaseVar v2)
DiscPhaseVarmax in interface DiscPhaseVarv2 - Variable to compare with the originalDiscPhaseVar.max(jphase.DiscPhaseVar)public final java.lang.String toString()
JMarkovElement
public final String toString() {
return label();
}
toString in interface JMarkovElementtoString in interface DiscPhaseVartoString in class java.lang.ObjectDiscPhaseVar.toString()public java.lang.String label()
JMarkovElementlabel in interface JMarkovElementJMarkovElement.description()public java.lang.String description()
JMarkovElementdescription in interface JMarkovElementJMarkovElement.label()