/** * Equivalent to <tt>nextDouble()</tt>. This has the effect that distributions can now be used as function objects, * returning a random number upon function evaluation. */ @Override public double apply(double dummy) { return nextDouble(); }
@Setup public void setUp() { random = ThreadLocalRandom.current(); tdigest = tdigestFactory.create(compression); distribution = distributionFactory.create(random); // first values are cheap to add, so pre-fill the t-digest to have more realistic results for (int i = 0; i < 10000; ++i) { tdigest.add(distribution.nextDouble()); } for (int i = 0; i < data.length; ++i) { data[i] = distribution.nextDouble(); } }
/** * Equivalent to <tt>nextDouble()</tt>. This has the effect that distributions can now be used as function objects, * returning a random number upon function evaluation. */ @Override public double apply(double dummy) { return nextDouble(); }
/** * Equivalent to <tt>nextDouble()</tt>. This has the effect that distributions can now be used as function objects, * returning a random number upon function evaluation. */ @Override public double apply(double dummy) { return nextDouble(); }