jphase
Class CoxVar

java.lang.Object
  extended by jphase.AbstractContPhaseVar
      extended by jphase.CoxVar
All Implemented Interfaces:
JMarkovElement, ContPhaseVar, PhaseVar

public class CoxVar
extends AbstractContPhaseVar
implements PhaseVar

Version:
0.1 returns This class allows the creation and manipulation of Cox distributions. The associated matrix has dense representation
Author:
German Riaņo, Juan Fernando Perez

Constructor Summary
CoxVar(int n)
          Constructor of a Cox variable with n phases
 
Method Summary
 ContPhaseVar copy()
          Creates a deep copy of the original Phase-Type Variable
 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
 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 jphase.PhaseVar
cdf, cdf, CV, expectedValue, getMat0, getMat0Array, getMatrixArray, getNumPhases, getVec0, getVectorArray, lossFunction1, lossFunction2, median, moment, prob, quantil, stdDeviation, survival, survival, variance
 
Methods inherited from interface jmarkov.basic.JMarkovElement
description, equals, label, toString
 

Constructor Detail

CoxVar

public CoxVar(int n)
Constructor of a Cox variable with n phases

Parameters:
n - number of phases Cox variable with n phases
Method Detail

getMatrix

public no.uib.cipr.matrix.Matrix getMatrix()
Description copied from interface: PhaseVar
Returns the transition matrix of the Phase-Type Distribution

Specified by:
getMatrix in interface PhaseVar
Returns:
Transition matrix for transient states of the Phase-Type Distribution

setMatrix

public void setMatrix(no.uib.cipr.matrix.Matrix A)
Description copied from interface: PhaseVar
Rate Matrix = A

Specified by:
setMatrix in interface PhaseVar
Parameters:
A - Transition matrix for transient states of the Phase-Type Distribution

getVector

public no.uib.cipr.matrix.Vector getVector()
Description copied from interface: PhaseVar
Returns the initial probability mass vector

Specified by:
getVector in interface PhaseVar
Returns:
Initial probability mass vector

setVector

public void setVector(no.uib.cipr.matrix.Vector alpha)
Description copied from interface: PhaseVar
Initial Probability vector = alpha

Specified by:
setVector in interface PhaseVar
Parameters:
alpha - Initial probability mass vector

copy

public ContPhaseVar copy()
Description copied from interface: ContPhaseVar
Creates a deep copy of the original Phase-Type Variable

Specified by:
copy in interface ContPhaseVar
Specified by:
copy in interface PhaseVar
Returns:
A deep copy of the original Phase-Type Variable

newVar

public ContPhaseVar newVar(int n)
Description copied from interface: ContPhaseVar
Creates a new variable of the same class of the original Continuous Phase-Type Variable

Specified by:
newVar in interface ContPhaseVar
Parameters:
n - number of Phases of the new Variable
Returns:
A new variable of the same class of the original Continuous Phase-Type Variable