Class ThinRVG

All Implemented Interfaces:
RandomVectorGenerator, Seedable

public class ThinRVG extends Object implements RandomVectorGenerator
Thinning is a scheme that returns every m-th item, discarding the last m-1 items for each draw. This usually helps reduce serial correlation.
  • Constructor Details

    • ThinRVG

      public ThinRVG(RandomVectorGenerator rvg, int m)
      Constructs a thinned RVG.
      rvg - an underlying RVG
      m - the number of items to draw from the underlying RVG for each draw
  • Method Details

    • nextVector

      public double[] nextVector()
      Description copied from interface: RandomVectorGenerator
      Gets the next random vector.
      Specified by:
      nextVector in interface RandomVectorGenerator
      the next random vector
    • seed

      public void seed(long... seeds)
      Description copied from interface: Seedable
      Seed the random number/vector/scenario generator to produce repeatable experiments.
      Specified by:
      seed in interface Seedable
      seeds - the seeds