UNPKG

897 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function setIsSubset
4
5Check whether a (multi)set is a subset of another (multi)set. (Every element of set1 is the element of set2.)
6Multi-dimension arrays will be converted to single-dimension arrays before the operation.
7
8
9## Syntax
10
11```js
12math.setIsSubset(set1, set2)
13```
14
15### Parameters
16
17Parameter | Type | Description
18--------- | ---- | -----------
19`a1` | Array &#124; Matrix | A (multi)set
20`a2` | Array &#124; Matrix | A (multi)set
21
22### Returns
23
24Type | Description
25---- | -----------
26boolean | true | false
27
28
29## Examples
30
31```js
32math.setIsSubset([1, 2], [3, 4, 5, 6]) // returns false
33math.setIsSubset([3, 4], [3, 4, 5, 6]) // returns true
34```
35
36
37## See also
38
39[setUnion](setUnion.md),
40[setIntersect](setIntersect.md),
41[setDifference](setDifference.md)