It's used in the statistics package for sampling. The Histogram class holds a pool of values for calculating means and variances from a stream of data, and uses the ThreadLocalRandom to determine whether or not a new value will be added to the pool.
This is copied directly from the existing metrics code, and it's quite possible that there's already something in Lucene that I could use instead. Which would also clear up the license header problem. :-) On 2 Jan 2013, at 07:59, Dawid Weiss wrote: > Just curious -- what do you need a thread local random for, Alan? Is > it for tests or for the main code? > > Dawid > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
