### Question:
Histogram { public Histogram(BinScheme binScheme) { this.hist = new float[binScheme.bins()]; this.count = 0.0f; this.binScheme = binScheme; } Histogram(BinScheme binScheme); void record(double value); double value(double quantile); float[] counts(); void clear(); @Override String toString();  }### Answer:
@Test public void testHistogram() { BinScheme scheme = new ConstantBinScheme(12, -5, 5); Histogram hist = new Histogram(scheme); for (int i = -5; i < 5; i++) hist.record(i); for (int i = 0; i < 10; i++) assertEquals(scheme.fromBin(i + 1), hist.value(i / 10.0 + EPS), EPS); }
@Test public void testHistogram() { BinScheme scheme = new ConstantBinScheme(10, -5, 5); Histogram hist = new Histogram(scheme); for (int i = -5; i < 5; i++) hist.record(i); for (int i = 0; i < 10; i++) assertEquals(scheme.fromBin(i), hist.value(i / 10.0 + EPS), EPS); }