lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <dawid.we...@cs.put.poznan.pl>
Subject Re: CC0 license compatibility
Date Wed, 02 Jan 2013 09:24:22 GMT
> 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.

You probably have talked about it but just to mention -- wouldn't an
algorithmic solution the type of rrd be better than collecting all the
individual samples? Depending on the stats you need of course. From
what I can remember rrd only stores a fixed size buffers so it's very
memory efficient.

http://code.google.com/p/rrd4j/

> 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.  :-)

There isn't in the main codebase I think. A congruential Random should
be pretty trivial to write though (since it's described in the JavaDoc
of Random itself). Doug's ThreadLocal version is useful but if your
code allows it you could just pass individual per-thread Random
instances to any interested code and not deal with ThreadLocals at
all.

There is also a number of Random implementations in commons-math and
they're definitely Apache licensed :)
http://commons.apache.org/math/userguide/random.html

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message