jphase.generator

## Class NeutsDiscPHGenerator

- java.lang.Object
- - jphase.generator.PhaseGenerator
  - - jphase.generator.NeutsDiscPHGenerator

-     public class NeutsDiscPHGenerator
      extends PhaseGenerator

  This class implements the algorithm proposed by Neuts and Pagano "generating Random Variates of Phase-Type", 1981. This is also based in the so called alias method to generate a variate from a discrete distribution. This class implements the algorithm for the discrete case.
  Version:
    1.0
  Author:
    Juan F. Pérez

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NeutsDiscPHGenerator(AbstractDiscPhaseVar var)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getRandom()`
    `double[]` | `getRandom(int num)`

    - ### Methods inherited from class jphase.generator.PhaseGenerator

      `getVar`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NeutsDiscPHGenerator

          public NeutsDiscPHGenerator(AbstractDiscPhaseVar var)

      See Also:
        `PhaseGenerator.PhaseGenerator(jphase.PhaseVar)`

  - ### Method Detail

    - #### getRandom

          public double getRandom()

      Specified by:
        `getRandom` in class `PhaseGenerator`
      Returns:
        A random number that has a probability distribution of Phase-Type

    - #### getRandom

          public double[] getRandom(int num)

      Specified by:
        `getRandom` in class `PhaseGenerator`
      Parameters:
        `num` - Number of variates to be generated
      Returns:
        A vector of random numbers that have a probability distribution of Phase-Type