mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
42 lines (26 loc) • 869 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Create the cartesian product of two (multi)sets.
Multi-dimension arrays will be converted to single-dimension arrays before the operation.
## Syntax
```js
math.setCartesian(set1, set2)
```
### Parameters
Parameter | Type | Description
--------- | ---- | -----------
`a1` | Array | Matrix | A (multi)set
`a2` | Array &
Type | Description
---- | -----------
Array &
```js
math.setCartesian([1, 2], [3, 4]) // returns [[1, 3], [1, 4], [2, 3], [2, 4]]
```
[](setUnion.md),
[](setIntersect.md),
[](setDifference.md),
[](setPowerset.md)