Module bio::stats::combinatorics [−][src]
Combinations with and without replacement.
Functions
combinations | Calculate the number of combinations when choosing k elements from n elements without replacement. This is also known as n over k, or the binomial coefficient. Time complexity: O(min(k, n - k)) |
combinations_with_repl | Calculate the number of combinations when choosing k elements from n elements with replacement. Time complexity: O(min(k, n - k)) |
scaled_combinations | Calculate the number of combinations when choosing k elements from n elements without replacement, multiplied by a scaling factor. Time complexity: O(min(k, n - k)) |