simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

setIsSubset.md (949B)


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