A.W. Kemp (1981): Efficient generation of logarithmically distributed pseudo-random variables, Appl. Statist. 30, 249-253. @author wolfgang.hoschek@cern.ch @version 1.0, 09/24/99
107108109110111112113
//// protected methods //// /** Method that is called after _randomNumberGenerator is changed. */ protected void _createdNewRandomNumberGenerator() { _generator = new Logarithmic(0.5, _randomNumberGenerator); }
4950515253545556575859
assertTrue(String.format("Expected %s was %s", Arrays.toString(expected), Arrays.toString(actual)), Arrays.equals(expected, actual)); } public void testLogarithmicScaling() throws Exception { Histogram histogram = new Histogram(1, 1, 3, new Logarithmic()); for (int i=0; i<100; i++) { histogram.value(1); } for (int i=0; i<10; i++) { histogram.value(2);
6162636465666768
} public String getHistogram() { GradeCategories gradeCategories = new GradeCategories(maxExcellentCost, maxAcceptableCost); HistogramChartUrl histogramChartUrl = gradeCategories.createHistogram(HISTOGRAM_WIDTH, HISTOGRAM_HEIGHT, costs, new Logarithmic()); return histogramChartUrl.getHtml(); }