[{"name":"RandomPool","comment":"\n\n\n# Types\n\n@docs RandomPool\n\n\n# Creation\n\n@docs singleton, fromList\n\n\n# Addition\n\n@docs insertWithRelativeWeight, insertListWithRelativeWeight\n\n\n# Random Operation\n\n@docs suck, suckFor, cycle\n\n\n# Pump Operation\n\n@docs get, discard\n\n\n# Query\n\n@docs count, totalWeight\n\n","unions":[{"name":"RandomPool","comment":" Represents pooled data which can be randomly chosen.\nThe data are devided into two parts, named _pump_ and _pond_. Contents in pump are already chosen but not yet used. Contents in pond are yet to be chosen. This division is for implementing behavior like \"the same thing never happens continuously\".\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"name":"count","comment":" Returnes how many contents in the pool.\n","type":"RandomPool.RandomPool a -> Basics.Int"},{"name":"cycle","comment":" Get one new element from the pond into pump, and changes the weight of the head and release it to the pond.\n","type":"Basics.Float -> RandomPool.RandomPool a -> Random.Generator ( a, RandomPool.RandomPool a )"},{"name":"discard","comment":" Removes the head of pump. Nothing occurs if the pump is empty.\n","type":"RandomPool.RandomPool a -> RandomPool.RandomPool a"},{"name":"fromList","comment":" Creates new `randompool` with all the element in the list poured into pond and empty pump.\n","type":"( Basics.Float, a ) -> List.List ( Basics.Float, a ) -> RandomPool.RandomPool a"},{"name":"get","comment":" Returns the head(the oldest element) of pump.\n","type":"RandomPool.RandomPool a -> Maybe.Maybe a"},{"name":"insertListWithRelativeWeight","comment":" Inserts arbitrary number of elements into the pond.\nThe first component of parameter list content is relative weight. (`1` means total weight before any of them are inserted.)\n","type":"List.List ( Basics.Float, a ) -> RandomPool.RandomPool a -> RandomPool.RandomPool a"},{"name":"insertWithRelativeWeight","comment":" Pour one new element into the pond. The first parameter is the relative weight of the added element. Relative weight of `1` means that the new element has the same weight as the total of all other elements in the pond.\n","type":"Basics.Float -> a -> RandomPool.RandomPool a -> RandomPool.RandomPool a"},{"name":"singleton","comment":" Creates new `randompool` with only one element in the pond and empty pump.\n","type":"a -> RandomPool.RandomPool a"},{"name":"suck","comment":" Random generator that generates RandomePool which consists of pump with one more element randomly chosen from the pond and pond with that element removed.\n","type":"RandomPool.RandomPool a -> Random.Generator (RandomPool.RandomPool a)"},{"name":"suckFor","comment":" `suck` for arbitrary times.\n","type":"Basics.Int -> RandomPool.RandomPool a -> Random.Generator (RandomPool.RandomPool a)"},{"name":"totalWeight","comment":" Returnes the sum of weight in the pool represented as `WideFloat`.\n","type":"RandomPool.RandomPool a -> WideFloat.WideFloat"}],"binops":[]}]