/** * Fills a bitset with decisions according to the supplied rate with the supplied {@link Random}. */ CountingSampler(float rate, Random random) { counter = new AtomicInteger(); int outOf100 = (int) (rate * 100.0f); this.sampleDecisions = randomBitSet(100, outOf100, random); }
/** * Fills a bitset with decisions according to the supplied rate with the supplied {@link Random}. */ CountingSampler(float rate, Random random) { counter = new AtomicInteger(); int outOf100 = (int) (rate * 100.0f); this.sampleDecisions = randomBitSet(100, outOf100, random); }