Liking cljdoc? Tell your friends :D
Clojure only.

clj-random.roulette


lspinclj

(lspin wheel)
(lspin wheel spin-value)

Draw from a roulette wheel.

Draw from a roulette wheel.
sourceraw docstring

wheelclj

(wheel weights individuals)

Return a roulette-wheel for a map of things and numerical weights. Input is:

  • sequence weights for each individual (used for making upper limits)
  • sequence of individuals (will become values) Result is a sorted map with upper-limits of ranges within [0,1] that are used in the probability of selection for a given value. The lower limit of the first entry is 0.
Return a roulette-wheel for a map of things and numerical weights.
Input is:
  - sequence weights for each individual (used for making upper limits)
  - sequence of individuals (will become values)
Result is a sorted map with upper-limits of ranges within [0,1] that are used
  in the probability of selection for a given value. The lower limit of the 
  first entry is 0.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close