Package ubic.basecode.math.distribution
Class HistogramSampler
java.lang.Object
ubic.basecode.math.distribution.HistogramSampler
Implements a simple (not very efficient) sampling algorithm for empirical distributions.
- Author:
- Paul
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramSampler(int[] counts, double min, double max) HistogramSampler(Histogram1D histogram) -
Method Summary
-
Constructor Details
-
HistogramSampler
- 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()
-