Package jline.api.mam

Class Rap_sample.RapSampler

java.lang.Object
jline.api.mam.Rap_sample.RapSampler
Enclosing class:
Rap_sample

public static final class Rap_sample.RapSampler extends Object
Stateful RAP sampler that carries the conditional phase vector across draws, so successive inter-event times are correlated as in the process.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builds the cached grid of matrix exponentials of H0 and initialises the conditional vector to the embedded stationary vector.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    next(Random random)
    Draws one inter-event time and advances the conditional phase vector.
    void
    Resets the conditional vector to the embedded stationary vector.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RapSampler

      public RapSampler(Matrix D0, Matrix D1)
      Builds the cached grid of matrix exponentials of H0 and initialises the conditional vector to the embedded stationary vector.
      Parameters:
      D0 - the hidden-transition matrix H0
      D1 - the visible-transition matrix H1
  • Method Details

    • next

      public double next(Random random)
      Draws one inter-event time and advances the conditional phase vector.
      Parameters:
      random - the uniform random source
      Returns:
      the next inter-event time
    • reset

      public void reset()
      Resets the conditional vector to the embedded stationary vector.