Class HistogramSampler


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

      • HistogramSampler

        public HistogramSampler​(hep.aida.ref.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 Detail

      • nextSample

        public double nextSample()