pub fn comb_rep<N: PrimInt + Unsigned>(n: N, k: N) -> NExpand description
$k$-combinations of $n$ things with replacement
Because this (also) counts the number of multisets of size $k$ drawn from an $n$-element set, it is also known as the multiset coefficient, and sometimes expressed as “$n$ multichoose $k$”.
It is equivalent to comb(n + k - 1, k).
Pure rust implementation of scipy.special.comb(n, k, exact=True, repetition=True).
§Types
N: Any unsigned integer