jphase
Interface PhaseVar

All Superinterfaces:
JMarkovElement
All Known Subinterfaces:
ContPhaseVar, DiscPhaseVar
All Known Implementing Classes:
AbstractContPhaseVar, AbstractDiscPhaseVar, DenseContPhaseVar, DenseDiscPhaseVar, ErlangCoxianVar, HyperErlangVar, SparseContPhaseVar, SparseDiscPhaseVar

public interface PhaseVar
extends JMarkovElement

This interface defines the behaviour that any Phase-Type distribution should have

Version:
0.1
Author:
German Riaņo, Juan Fernando Perez

Method Summary
 double cdf(double x)
          Evaluates the cumulative density function at x
 double[] cdf(int n, double delta)
          Evaluates the Cumulative Density Function at n values of x, starting with x=0, step delta
 PhaseVar copy()
          Creates a deep copy of the original Phase-Type Variable
 double CV()
          Computes the Coefficient of Variation of the Phase variable
 double expectedValue()
          Computes the Expected Value of the Phase variable
 no.uib.cipr.matrix.Vector getMat0()
          Returns the exit vector from the transient states to absorption
 double[] getMat0Array()
          Returns the exit vector in double[] format
 no.uib.cipr.matrix.Matrix getMatrix()
          Returns the transition matrix of the Phase-Type Distribution
 double[][] getMatrixArray()
          Returns the transition matrix in double format
 int getNumPhases()
          Returns the number of Phases of the Phase distribution
 double getVec0()
          Returns the probability mass at zero (alpha_0)
 no.uib.cipr.matrix.Vector getVector()
          Returns the initial probability mass vector
 double[] getVectorArray()
          Returns the initial probability mass vector in double[] format
 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
 double median()
          Compuetes the median of the distribution
 double moment(int k)
          Compuetes the k-th Moment of the Phase variable
 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
 void setMatrix(no.uib.cipr.matrix.Matrix A)
          Rate Matrix = A
 void setVector(no.uib.cipr.matrix.Vector alpha)
          Initial Probability vector = alpha
 double stdDeviation()
          Computes the Standard deviation of the Phase variable
 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
 double variance()
          Computes the Variance of the Phase variable
 
Methods inherited from interface jmarkov.basic.JMarkovElement
description, equals, label, toString
 

Method Detail

getMatrix

no.uib.cipr.matrix.Matrix getMatrix()
Returns the transition matrix of the Phase-Type Distribution

Returns:
Transition matrix for transient states of the Phase-Type Distribution

setMatrix

void setMatrix(no.uib.cipr.matrix.Matrix A)
Rate Matrix = A

Parameters:
A - Transition matrix for transient states of the Phase-Type Distribution

getVector

no.uib.cipr.matrix.Vector getVector()
Returns the initial probability mass vector

Returns:
Initial probability mass vector

setVector

void setVector(no.uib.cipr.matrix.Vector alpha)
Initial Probability vector = alpha

Parameters:
alpha - Initial probability mass vector

getNumPhases

int getNumPhases()
Returns the number of Phases of the Phase distribution

Returns:
Number of Phases of the Phase distribution

getVec0

double getVec0()
Returns the probability mass at zero (alpha_0)

Returns:
Probability mass at zero (alpha_0)

getMat0

no.uib.cipr.matrix.Vector getMat0()
Returns the exit vector from the transient states to absorption

Returns:
Exit vector from the transient states to absorption

getMatrixArray

double[][] getMatrixArray()
Returns the transition matrix in double format

Returns:
Transition matrix for transient states of the Phase-Type Distribution in double[][] format

getVectorArray

double[] getVectorArray()
Returns the initial probability mass vector in double[] format

Returns:
Initial probability mass vector in double[] format

getMat0Array

double[] getMat0Array()
Returns the exit vector in double[] format

Returns:
Exit vector from the transient states to absorption in double[] format

copy

PhaseVar copy()
Creates a deep copy of the original Phase-Type Variable

Returns:
A deep copy of the original Phase-Type Variable

expectedValue

double expectedValue()
Computes the Expected Value of the Phase variable

Returns:
Expected Value of the Phase variable

variance

double variance()
Computes the Variance of the Phase variable

Returns:
Variance of the Phase variable

stdDeviation

double stdDeviation()
Computes the Standard deviation of the Phase variable

Returns:
Standard deviation of the Phase variable

CV

double CV()
Computes the Coefficient of Variation of the Phase variable

Returns:
Coefficient of Variation of the Phase variable

moment

double moment(int k)
Compuetes the k-th Moment of the Phase variable

Parameters:
k - Moment
Returns:
k-th Moment of the Phase variable

cdf

double cdf(double x)
Evaluates the cumulative density function at x

Parameters:
x - Evaluation point
Returns:
Cumulative density function at x

cdf

double[] cdf(int n,
             double delta)
Evaluates the Cumulative Density Function at n values of x, starting with x=0, step delta

Parameters:
n - number of evaluation points
delta - distance between evaluation points
Returns:
Evaluation of the survival Function at x = 0,d,2d,..,(n-1)d

prob

double prob(double a,
            double b)
Computes the probability that this variable takes a value between a and b

Parameters:
a - inferior limit
b - superior limit
Returns:
Probability that this variable takes a value between a and b

survival

double survival(double x)
Evaluates the survival function at x

Parameters:
x - Evaluation point
Returns:
Evaluation of the survival Function at x = 1-F(x)=P(X>x)

survival

double[] survival(int n,
                  double delta)
Evaluates the Survival Function at n values of x, starting with x=0, step delta

Parameters:
n - number of evaluation points
delta - distance between evaluation points
Returns:
Evaluation of the survival Function at x = 0,d,2d,..,(n-1)d

lossFunction1

double lossFunction1(double x)
Evaluates the loss function of order 1 at x

Parameters:
x - Evaluation point
Returns:
Evaluation of the loss function of order 1

lossFunction2

double lossFunction2(double x)
Evaluates the loss function of order 2 at x

Parameters:
x - Evaluation point
Returns:
Evaluation of the loss function of order 2

quantil

double quantil(double p)
Computes the quantile q of the distribution, such that F(q) = p

Parameters:
p - probability such that F(q) = p
Returns:
The quantile q of the distribution, such that F(q) = p

median

double median()
Compuetes the median of the distribution

Returns:
The median of the distribution