UNPKG

777 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function composition
4
5The composition counts of n into k parts.
6
7composition only takes integer arguments.
8The following condition must be enforced: k <= n.
9
10
11## Syntax
12
13```js
14math.composition(n, k)
15```
16
17### Parameters
18
19Parameter | Type | Description
20--------- | ---- | -----------
21`n` | Number &#124; BigNumber | Total number of objects in the set
22`k` | Number &#124; BigNumber | Number of objects in the subset
23
24### Returns
25
26Type | Description
27---- | -----------
28Number &#124; BigNumber | Returns the composition counts of n into k parts.
29
30
31## Examples
32
33```js
34math.composition(5, 3) // returns 6
35```
36
37
38## See also
39
40[combinations](combinations.md)
41
\No newline at end of file