[erlang-questions] Reservoir sampling gen_server

Robert Schonberger rschonberger@REDACTED
Sat Mar 28 07:36:33 CET 2009

hi everyone,I wanted to give my brain a bit of an exercise this morning, and
so I wrote a gen_server that, given an arbitrary number of inputs, can
provide a statistically random sample of those inputs.

The inputs are passed via handle_cast, and a retrieval via handle_call. If
you're interested in keeping a sample of a large amount of data, this could
be interesting for you.

Any comments would be appreciated, and patches / advice more so,



Robert Schonberger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090328/01349a41/attachment.htm>

More information about the erlang-questions mailing list