UNPKG

981 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function combinationsWithRep
4
5Compute the number of ways of picking `k` unordered outcomes from `n`
6possibilities, allowing individual outcomes to be repeated more than once.
7
8CombinationsWithRep only takes integer arguments.
9The following condition must be enforced: k <= n + k -1.
10
11
12## Syntax
13
14```js
15math.combinationsWithRep(n, k)
16```
17
18### Parameters
19
20Parameter | Type | Description
21--------- | ---- | -----------
22`n` | number &#124; BigNumber | Total number of objects in the set
23`k` | number &#124; BigNumber | Number of objects in the subset
24
25### Returns
26
27Type | Description
28---- | -----------
29number &#124; BigNumber | Number of possible combinations with replacement.
30
31
32## Examples
33
34```js
35math.combinationsWithRep(7, 5) // returns 462
36```
37
38
39## See also
40
41[combinations](combinations.md),
42[permutations](permutations.md),
43[factorial](factorial.md)
44
\No newline at end of file