Liking cljdoc? Tell your friends :D

provisdom.math.combinatorics


bell-numberclj

(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`.
sourceraw docstring

binomial-probabilityclj

(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]].
sourceraw docstring

cartesian-productclj

(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`.
sourceraw docstring

choose-k-from-nclj

(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]].
sourceraw docstring

choose-k-from-n'clj

(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]].
sourceraw docstring

combinationsclj

(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`.
sourceraw docstring

combinations-using-allclj

(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.
sourceraw docstring

combinations-with-complementsclj

(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.
sourceraw docstring

distinct-combinations-with-replacementclj

(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.
sourceraw docstring

factorialclj

(factorial x)

Returns the factorial of x.

Returns the factorial of `x`.
sourceraw docstring

factorial'clj

(factorial' x)

Returns the factorial of x. Returns long if possible.

Returns the factorial of `x`. Returns long if possible.
sourceraw docstring

log-binomial-probabilityclj

(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`.
sourceraw docstring

log-choose-k-from-nclj

(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]].
sourceraw docstring

log-factorialclj

(log-factorial x)

Returns the log-factorial of x

Returns the log-factorial of `x`
sourceraw docstring

mdlclj

source

permutationsclj

(permutations items)

All the permutations of items.

All the permutations of `items`.
sourceraw docstring

selectionsclj

(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.
sourceraw docstring

stirling-number-of-the-second-kindclj

(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.
sourceraw docstring

stirling-number-of-the-second-kind'clj

(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.
sourceraw docstring

subfactorialclj

(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.')
sourceraw docstring

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

× close