(bell-number n)Returns the number of partitions of a set of size n.
Returns the number of partitions of a set of size `n`.
(binomial-probability successes trials success-prob)Likelihood of seeing successes out of trials with success-prob.
successes and trials must be int, otherwise use
log-binomial-probability. For general use, if trials is greater than
1000, use log-binomial-probability.
Likelihood of seeing `successes` out of `trials` with `success-prob`. `successes` and `trials` must be int, otherwise use [[log-binomial-probability]]. For general use, if `trials` is greater than 1000, use [[log-binomial-probability]].
(cartesian-product & sequences-of-items)All the ways to take one item from each sequence in sequences-of-items.
All the ways to take one item from each sequence in `sequences-of-items`.
(choose-k-from-n k n)Returns the number of ways to choose k items out of n items.
n! / (k! × (n - k)!). k and n must be int, otherwise use
log-choose-k-from-n.
Returns the number of ways to choose `k` items out of `n` items. `n`! / (`k`! × (`n` - `k`)!). `k` and `n` must be int, otherwise use [[log-choose-k-from-n]].
(choose-k-from-n' k n)Returns the number of ways to choose k items out of n items.
n! / (k! × (n - k)!). Returns a long if possible. k and n must be
int, otherwise use log-choose-k-from-n.
Returns the number of ways to choose `k` items out of `n` items. `n`! / (`k`! × (`n` - `k`)!). Returns a long if possible. `k` and `n` must be int, otherwise use [[log-choose-k-from-n]].
(combinations items)(combinations items n)All the unique ways of taking n different elements from items, or all the
unique ways of taking different elements from items.
All the unique ways of taking `n` different elements from `items`, or all the unique ways of taking different elements from `items`.
(combinations-using-all items breakdown)Combinations that use all of the items by grouping into the breakdown
pattern, where breakdown is a collection of positive longs that sum to the
number of items.
Combinations that use all of the `items` by grouping into the `breakdown` pattern, where `breakdown` is a collection of positive longs that sum to the number of items.
(combinations-with-complements items)(combinations-with-complements items n)All combinations of size n with complements, or all combinations with
complements.
All combinations of size `n` with complements, or all combinations with complements.
(distinct-combinations-with-replacement items n)All distinct combinations of the items with replacement of up to n
items.
All distinct combinations of the `items` with replacement of up to `n` items.
(factorial x)Returns the factorial of x.
Returns the factorial of `x`.
(factorial' x)Returns the factorial of x. Returns long if possible.
Returns the factorial of `x`. Returns long if possible.
(log-binomial-probability successes trials success-prob)Log-Likelihood of seeing successes out of trials with success-prob.
Log-Likelihood of seeing `successes` out of `trials` with `success-prob`.
(log-choose-k-from-n k n)Returns the log of the number of ways to choose k items out of n items.
n must be >= k, and n and k must be non-negative. Otherwise, use
choose-k-from-n.
Returns the log of the number of ways to choose `k` items out of `n` items. `n` must be >= `k`, and `n` and `k` must be non-negative. Otherwise, use [[choose-k-from-n]].
(log-factorial x)Returns the log-factorial of x
Returns the log-factorial of `x`
(permutations items)All the permutations of items.
All the permutations of `items`.
(selections items n)All the ways of taking n (possibly the same) elements from the sequence of
items.
All the ways of taking `n` (possibly the same) elements from the sequence of items.
(stirling-number-of-the-second-kind k n)Returns the number of ways to partition a set of n items into k subsets.
Returns the number of ways to partition a set of `n` items into `k` subsets.
(stirling-number-of-the-second-kind' k n)Returns the number of ways to partition a set of n items into k subsets.
Returns long if possible.
Returns the number of ways to partition a set of `n` items into `k` subsets. Returns long if possible.
(subfactorial x)Returns the subfactorial of x. The number of ways that n objects can be
arranged where no object appears in its natural position (known as
'derangements.')
Returns the subfactorial of `x`. The number of ways that n objects can be arranged where no object appears in its natural position (known as 'derangements.')
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |