Liking cljdoc? Tell your friends :D

disultory.decision


decide-boolean-attributeclj

(decide-boolean-attribute attr)

This function structures the data for boolean attributes.

This function structures the data for boolean attributes.
raw docstring

decide-dice-attributeclj

(decide-dice-attribute attr)

This function dispatches dice attributes to be calculated.

This function dispatches dice attributes to be calculated.
raw docstring

decide-dice-optionclj

(decide-dice-option option)

This function totals up the additive dice rolls and the subtractive dice rolls, then subtracts the latter from the former.

This function totals up the additive dice rolls and the subtractive
dice rolls, then subtracts the latter from the former.
raw docstring

decide-distinct-attributeclj

(decide-distinct-attribute attr)

This function structures the data for distinct attributes.

This function structures the data for distinct attributes.
raw docstring

decide-fixed-attributeclj

(decide-fixed-attribute attr)

Structures the data for fixed attributes.

(decide-fixed-attribute {:id :name :type :fixed :value "Tom"}) => {:name "Tom"}

Structures the data for fixed attributes.

(decide-fixed-attribute {:id :name :type :fixed :value "Tom"})
  => {:name "Tom"}
raw docstring

decide-fn-attributeclj

(decide-fn-attribute attr spec)

Structures the data for function attributes.

Structures the data for function attributes.
raw docstring

decide-multiple-choice-attributeclj

(decide-multiple-choice-attribute attr)

This function structures the data for multiple choice attributes.

This function structures the data for multiple choice attributes.
raw docstring

decide-n-choice-attributeclj

(decide-n-choice-attribute attr)

This function structures the data for n-choice attributes.

This function structures the data for n-choice attributes.
raw docstring

decide-random-attributeclj

(decide-random-attribute attr)

This function dispatches random attributes to be calculated.

This function dispatches random attributes to be calculated.
raw docstring

get-weighted-distributionclj

(get-weighted-distribution opts)

Takes any number of options with probabilities expressed as numerators and returns a weighted distribution suitable for use with rand-nth.

(get-weighted-distribution [[:male 1] [:female 4]]) => [:male :female :female :female :female]

Takes any number of options with probabilities expressed as numerators
and returns a weighted distribution suitable for use with rand-nth.

(get-weighted-distribution [[:male 1] [:female 4]])
  => [:male :female :female :female :female]
raw docstring

roll-booleanclj

(roll-boolean prob)

This function takes a probability, specified as a number between 0.0 and 1.0, and returns a decision for that probability.

This function takes a probability, specified as a number between 0.0
and 1.0, and returns a decision for that probability.
raw docstring

roll-diceclj

(roll-dice dice)

Simple dice roller function, takes a single input in the form {:number n :sides z} and rolls ndz (dice notation) dice, returning only the cumulative total.

Simple dice roller function, takes a single input in the form
{:number n :sides z} and rolls ndz (dice notation) dice, returning
only the cumulative total.
raw docstring

roll-dice-for-functionclj

(roll-dice-for-function dice fn)

This sums the rolls for all dice with a specified function.

This sums the rolls for all dice with a specified function.
raw docstring

roll-distinctclj

(roll-distinct & opts)

Compositional function which takes options for a distinct attribute and randomly chooses one from a weighted distribution.

Compositional function which takes options for a distinct attribute
and randomly chooses one from a weighted distribution.
raw docstring

roll-onceclj

(roll-once sides)

Simulates a single roll of a dice.

Simulates a single roll of a dice.
raw docstring

sidesclj

(sides dice)

Takes a dice and returns its number of sides, if the number of sides is absent from the dice, we return 1.

Takes a dice and returns its number of sides, if the number of sides
is absent from the dice, we return 1.
raw docstring

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

× close