jphase.generator
Class PhaseGenerator

java.lang.Object
  extended by jphase.generator.PhaseGenerator
Direct Known Subclasses:
NeutsContPHGenerator, NeutsDiscPHGenerator

public abstract class PhaseGenerator
extends java.lang.Object

This abstract class defines the behaviour that any Phase-Type random number generator should have

Author:
Juan Fernando Perez

Field Summary
protected  PhaseVar var
          Phase variable from which the random numbers must be generated
 
Constructor Summary
PhaseGenerator(PhaseVar var)
          Construcs a new PhaseGenerator through its initialization
 
Method Summary
abstract  double getRandom()
           
abstract  double[] getRandom(int num)
           
 PhaseVar getVar()
           
protected abstract  void initialize()
          Initialize the cutoff values and the aliases for the initial probability distribution and the transition probability matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

var

protected PhaseVar var
Phase variable from which the random numbers must be generated

Constructor Detail

PhaseGenerator

public PhaseGenerator(PhaseVar var)
Construcs a new PhaseGenerator through its initialization

Parameters:
var - variable from which the random numbers must be generated
Method Detail

getRandom

public abstract double getRandom()
Returns:
A random number that has a probability distribution of Phase-Type

getRandom

public abstract double[] getRandom(int num)
Parameters:
num - Number of variates to be generated
Returns:
A vector of random numbers that have a probability distribution of Phase-Type

initialize

protected abstract void initialize()
Initialize the cutoff values and the aliases for the initial probability distribution and the transition probability matrix


getVar

public PhaseVar getVar()
Returns:
Phase variable that is being used to generate the random numbers