Class HistogramSampler

java.lang.Object
ubic.basecode.math.distribution.HistogramSampler

public class HistogramSampler extends Object
Implements a simple (not very efficient) sampling algorithm for empirical distributions.
Author:
Paul
  • Constructor Details

    • HistogramSampler

      public HistogramSampler(Histogram1D histogram)
      Parameters:
      histogram -
    • HistogramSampler

      public HistogramSampler(int[] counts, double min, double max)
      Parameters:
      counts - Array of counts of how many events there are for each bin, from min to max.
      min - Minimum of range histogram covers (value of the start of the first bin)
      max - Maximum of range histogram covers (value at the start of the last bin)
  • Method Details

    • nextSample

      public double nextSample()