@Test public void testGetFrequency() { Histogram h = new Histogram(0, 16, 2); h.add(0); h.add(1); h.add(3); h.add(3); h.add(3.5); assertEquals(2.0, h.getFrequency(0), EPSILON); assertEquals(3.0, h.getFrequency(1), EPSILON); }
public double getFrequency(int index) { return frequencies[index]; }
Histogram implements Iterable<Histogram.Bin> { public double getFrequency(int index) { return frequencies[index]; } }
Histogram implements Iterable<Histogram.Bin> { public double getFrequency(int index) { return frequencies[index]; } Histogram(double minValue, double maxValue, double resolution); }
Histogram implements Iterable<Histogram.Bin> { public double getFrequency(int index) { return frequencies[index]; } Histogram(double minValue, double maxValue, double resolution); void smooth(double windowLength); void circularSmooth(double windowLength); void kernelSmooth(double[] kernel); void circularKernelSmooth(double[] kernel); double[] createGaussianKernel(double length, double stdDeviation); void circularGaussianSmooth(double windowLength, double stdDeviation); void gaussianSmooth(double windowLength, double stdDeviation); void add(double value); int getSize(); double getFrequency(int index); double getPeakValue(); static Histogram fromValues(Collection<Double> samples, double resolution); @Override Iterator<Bin> iterator(); }
Histogram implements Iterable<Histogram.Bin> { public double getFrequency(int index) { return frequencies[index]; } Histogram(double minValue, double maxValue, double resolution); void smooth(double windowLength); void circularSmooth(double windowLength); void kernelSmooth(double[] kernel); void circularKernelSmooth(double[] kernel); double[] createGaussianKernel(double length, double stdDeviation); void circularGaussianSmooth(double windowLength, double stdDeviation); void gaussianSmooth(double windowLength, double stdDeviation); void add(double value); int getSize(); double getFrequency(int index); double getPeakValue(); static Histogram fromValues(Collection<Double> samples, double resolution); @Override Iterator<Bin> iterator();  }