Skip to main content

comb

Function comb 

Source
pub fn comb<N: PrimInt + Unsigned>(n: N, k: N) -> N
Expand description

$k$-combinations of $n$ things, $_nC_k$

This is often expressed as “$n$ choose $k$”.

Pure rust implementation of scipy.special.comb(n, k, exact=True).

§Types

  • N: Any unsigned integer

§See also

  • comb_rep: choosing with replacement
  • perm: $k$-permutations of $n$, $_nP_k$
  • binom: the binomial coefficient as a floating point function