Package jline.api.mam

Class Rap_sample

java.lang.Object
jline.api.mam.Rap_sample

public final class Rap_sample extends Object
Rational Arrival Process (RAP) sampling.

Generates random samples from a RAP distribution by delegating to the Matrix Exponential (ME) sampling algorithm. The marginal distribution of RAP inter-arrival times is an ME distribution.

Since:
LINE 3.0
  • Method Details

    • rap_sample

      public static double[] rap_sample(MatrixCell RAP, long n, Random random)
      Generates random samples from a Rational Arrival Process (RAP) distribution.

      The marginal distribution of RAP inter-arrival times is a Matrix Exponential (ME) distribution, so this function delegates to me_sample.

      Note: This generates samples from the marginal distribution only. It does not preserve the correlation structure of the RAP. For full RAP simulation with correlations, use map_sample instead.

      Parameters:
      RAP - the RAP distribution as a MatrixCell {H0, H1}
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of n samples from the RAP marginal distribution