[Haskell-cafe] naming a data structure for weighted random selection without replacement

Michał Pałka michal.palka at poczta.fm
Mon Feb 18 06:54:17 EST 2008


On Mon, 2008-02-18 at 11:37 +0000, Luke Palmer wrote:
> On Feb 18, 2008 5:11 AM, Stuart Cook <scook0 at gmail.com> wrote:
> > A while ago I wrote a little data structure that allows weighted
> > random selection-without-replacement from a collection of values in
> > O(log n) time.[1] I'm now in the process of packaging it up for
> > Hackage, but I'm looking for good names for both the type and its
> > operations.
> 
> I'm pretty sure it should have Random in the name whatever it is
> called.

Obvious idea: How about WeightedRandom?

Michał



More information about the Haskell-Cafe mailing list