Package ubic.basecode.math.distribution
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 Summary
Constructors Constructor Description HistogramSampler(int[] counts, double min, double max)
HistogramSampler(hep.aida.ref.Histogram1D histogram)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
nextSample()
-
-
-
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)
-
-