Beer recipe generators
Beer recipe generators
(inferred-hop-timing hop)
Select hop timings and uses based on the hop's type. Bittering hops will often be boiled for longer, and aroma hops are biased towards short boils and secondary additions.
Select hop timings and uses based on the hop's type. Bittering hops will often be boiled for longer, and aroma hops are biased towards short boils and secondary additions.
(make-random-selection ingredients selections count-cutoff)
Make a random selection from ingredients
.
If the number of selections
is already at the count-cutoff
, and a count-cutoff
has been selected, don't pick new ingredients.
Make a random selection from `ingredients`. If the number of `selections` is already at the `count-cutoff`, and a `count-cutoff` has been selected, don't pick new ingredients.
(random-hop-timing hop)
Select a random hop use and timing
Select a random hop use and timing
(select-hop-timings hops {:keys [timing-strategy] :as opts})
Given a common-beer-format hop and option map, update hop timings and uses. TODO : Allow use-weights and time-weights to differ by hop
Given a common-beer-format hop and option map, update hop timings and uses. TODO : Allow use-weights and time-weights to differ by hop
(select-ingredients-random ingredients {:keys [amount-cutoff count-cutoff]})
Assumptions: ingredients is a map of ingredient-keys to cbf conforming ingredients returned value is a list of cbf conforming ingredients
Assumptions: ingredients is a map of ingredient-keys to cbf conforming ingredients returned value is a list of cbf conforming ingredients
(select-ingredients-weighted ingredients
{:keys [amount-cutoff count-cutoff
selection-weights default-weight]})
Assumptions: ingredients is a map of ingredient-keys to cbf conforming ingredients returned value is a list of cbf conforming ingredients selection-weights is a map of ingredient-keys to numeric probability weights
Assumptions: ingredients is a map of ingredient-keys to cbf conforming ingredients returned value is a list of cbf conforming ingredients selection-weights is a map of ingredient-keys to numeric probability weights
(selected-amount selections)
Given a list of ingredients, return the total amount of ingredients
Given a list of ingredients, return the total amount of ingredients
(update-selection-probabilities ingredients weights default-weight)
(update-selection-probability ingredient-key ingredient weights default-weight)
Add the relevant :probability of ingredient
's selection.
If no match is found in weights
fall-back to default-weight
Add the relevant :probability of `ingredient`'s selection. If no match is found in `weights` fall-back to `default-weight`
(weighted-hop-timing hop {:keys [use-weights time-weights]})
Select hop timings and uses with the provided weights
Select hop timings and uses with the provided weights
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close