Class PseudoSampler

java.lang.Object
org.oristool.simulator.samplers.PseudoSampler
All Implemented Interfaces:
Sampler

public final class PseudoSampler extends Object implements Sampler
A pseudo-sampler cycling through a fixed sequence of sample (from a random initial point).
  • Constructor Details

    • PseudoSampler

      public PseudoSampler(BigDecimal... samples)
      Builds a new instance using the input samples.
      Parameters:
      samples - input samples
    • PseudoSampler

      public PseudoSampler(String filename, int initCapacity)
      Builds a new instance using samples from a file.
      Parameters:
      filename - file with one sample per line
      initCapacity - initial capacity of the list
  • Method Details

    • getSample

      public BigDecimal getSample()
      Description copied from interface: Sampler
      Returns the next sample.
      Specified by:
      getSample in interface Sampler
      Returns:
      next sample