Function combinations
pub fn combinations(n: u64, k: u64) -> Result<u128, CombinatoricsError>Expand description
Returns the number of unordered selections of size k from n items.
§Errors
Returns CombinatoricsError::KExceedsN when k > n.
Returns CombinatoricsError::CombinationOverflow when the result no
longer fits in u128.
§Examples
use use_combinatorics::combinations;
assert_eq!(combinations(5, 2)?, 10);