mathjs 7.3.0 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HISTORY.md +29 -0
- package/dist/math.js +2716 -2222
- package/dist/math.min.js +5 -5
- package/dist/math.min.map +1 -1
- package/docs/datatypes/units.md +21 -0
- package/docs/reference/functions/ceil.md +10 -1
- package/docs/reference/functions/fix.md +10 -2
- package/docs/reference/functions/floor.md +12 -3
- package/docs/reference/functions/rotate.md +47 -0
- package/docs/reference/functions/rotationMatrix.md +51 -0
- package/docs/reference/functions/round.md +6 -2
- package/docs/reference/functions.md +2 -0
- package/es/entry/dependenciesAny/dependenciesCeil.generated.js +4 -0
- package/es/entry/dependenciesAny/dependenciesFix.generated.js +2 -0
- package/es/entry/dependenciesAny/dependenciesFloor.generated.js +4 -0
- package/es/entry/dependenciesAny/dependenciesRotate.generated.js +14 -0
- package/es/entry/dependenciesAny/dependenciesRotationMatrix.generated.js +30 -0
- package/es/entry/dependenciesAny.generated.js +2 -0
- package/es/entry/impureFunctionsAny.generated.js +55 -53
- package/es/entry/pureFunctionsAny.generated.js +230 -206
- package/es/expression/embeddedDocs/embeddedDocs.js +4 -0
- package/es/expression/embeddedDocs/function/matrix/rotate.js +8 -0
- package/es/expression/embeddedDocs/function/matrix/rotationMatrix.js +8 -0
- package/es/expression/node/FunctionNode.js +1 -1
- package/es/expression/node/Node.js +2 -2
- package/es/factoriesAny.js +2 -0
- package/es/function/arithmetic/ceil.js +88 -4
- package/es/function/arithmetic/fix.js +43 -6
- package/es/function/arithmetic/floor.js +90 -6
- package/es/function/arithmetic/round.js +6 -2
- package/es/function/matrix/rotate.js +78 -0
- package/es/function/matrix/rotationMatrix.js +176 -0
- package/es/function/matrix/sqrtm.js +4 -0
- package/es/function/probability/pickRandom.js +2 -6
- package/es/function/special/erf.js +1 -0
- package/es/plain/number/constants.js +1 -1
- package/es/plain/number/probability.js +1 -0
- package/es/type/unit/Unit.js +17 -18
- package/es/utils/object.js +3 -1
- package/es/version.js +1 -1
- package/examples/bignumbers.js +2 -0
- package/lib/entry/dependenciesAny/dependenciesCeil.generated.js +6 -0
- package/lib/entry/dependenciesAny/dependenciesFix.generated.js +3 -0
- package/lib/entry/dependenciesAny/dependenciesFloor.generated.js +6 -0
- package/lib/entry/dependenciesAny/dependenciesRotate.generated.js +26 -0
- package/lib/entry/dependenciesAny/dependenciesRotationMatrix.generated.js +50 -0
- package/lib/entry/dependenciesAny.generated.js +16 -0
- package/lib/entry/impureFunctionsAny.generated.js +58 -56
- package/lib/entry/mainAny.js +5 -0
- package/lib/entry/mainNumber.js +5 -0
- package/lib/entry/pureFunctionsAny.generated.js +270 -244
- package/lib/expression/embeddedDocs/embeddedDocs.js +6 -0
- package/lib/expression/embeddedDocs/function/matrix/rotate.js +15 -0
- package/lib/expression/embeddedDocs/function/matrix/rotationMatrix.js +15 -0
- package/lib/expression/node/FunctionNode.js +1 -1
- package/lib/expression/node/Node.js +2 -2
- package/lib/factoriesAny.js +16 -0
- package/lib/function/arithmetic/ceil.js +91 -4
- package/lib/function/arithmetic/fix.js +44 -6
- package/lib/function/arithmetic/floor.js +93 -6
- package/lib/function/arithmetic/round.js +6 -2
- package/lib/function/matrix/rotate.js +88 -0
- package/lib/function/matrix/rotationMatrix.js +186 -0
- package/lib/function/matrix/sqrtm.js +4 -0
- package/lib/function/probability/pickRandom.js +3 -7
- package/lib/function/special/erf.js +1 -0
- package/lib/header.js +2 -2
- package/lib/plain/bignumber/index.js +1 -0
- package/lib/plain/number/constants.js +2 -1
- package/lib/plain/number/index.js +9 -0
- package/lib/plain/number/probability.js +1 -0
- package/lib/type/unit/Unit.js +17 -18
- package/lib/utils/object.js +3 -1
- package/lib/version.js +1 -1
- package/package.json +11 -11
- package/src/core/function/import.js +2 -2
- package/src/entry/dependenciesAny/dependenciesCeil.generated.js +4 -0
- package/src/entry/dependenciesAny/dependenciesFix.generated.js +2 -0
- package/src/entry/dependenciesAny/dependenciesFloor.generated.js +4 -0
- package/src/entry/dependenciesAny/dependenciesRotate.generated.js +15 -0
- package/src/entry/dependenciesAny/dependenciesRotationMatrix.generated.js +31 -0
- package/src/entry/dependenciesAny.generated.js +2 -0
- package/src/entry/impureFunctionsAny.generated.js +84 -80
- package/src/entry/pureFunctionsAny.generated.js +75 -71
- package/src/expression/embeddedDocs/embeddedDocs.js +4 -0
- package/src/expression/embeddedDocs/function/matrix/rotate.js +19 -0
- package/src/expression/embeddedDocs/function/matrix/rotationMatrix.js +19 -0
- package/src/expression/node/FunctionNode.js +1 -1
- package/src/expression/node/Node.js +2 -1
- package/src/factoriesAny.js +2 -0
- package/src/function/arithmetic/ceil.js +63 -3
- package/src/function/arithmetic/fix.js +45 -6
- package/src/function/arithmetic/floor.js +65 -5
- package/src/function/arithmetic/round.js +6 -2
- package/src/function/matrix/rotate.js +79 -0
- package/src/function/matrix/rotationMatrix.js +186 -0
- package/src/function/matrix/sqrtm.js +4 -0
- package/src/function/probability/pickRandom.js +2 -6
- package/src/function/special/erf.js +2 -0
- package/src/plain/number/constants.js +1 -1
- package/src/plain/number/probability.js +2 -0
- package/src/type/unit/Unit.js +18 -21
- package/src/utils/object.js +3 -1
- package/src/version.js +1 -1
package/docs/datatypes/units.md
CHANGED
|
@@ -139,6 +139,7 @@ math.createUnit('mile', '1609.347218694', {override: true}})
|
|
|
139
139
|
```
|
|
140
140
|
Base units created without specifying a definition cannot be overridden.
|
|
141
141
|
|
|
142
|
+
### Create several units at once
|
|
142
143
|
Multiple units can defined using a single call to `createUnit` by passing an object map as the first argument, where each key in the object is the name of a new unit and the value is either a string defining the unit, or an object with the configuration properties listed above. If the value is an empty string or an object lacking a definition property, a new base unit is created.
|
|
143
144
|
|
|
144
145
|
For example:
|
|
@@ -169,6 +170,26 @@ math.evaluate('45 mile/hour to createUnit("knot", "0.514444m/s")')
|
|
|
169
170
|
// 39.103964668651976 knot
|
|
170
171
|
```
|
|
171
172
|
|
|
173
|
+
### Support of custom characters in unit names
|
|
174
|
+
Per default, the name of a new unit:
|
|
175
|
+
- should start by a latin (A-Z or a-z) character
|
|
176
|
+
- should contain only numeric (0-9) or latin characters
|
|
177
|
+
|
|
178
|
+
It is possible to allow the usage of special characters (such as Greek alphabet, cyrillic alphabet, any Unicode symbols, etc.) by overriding the `Unit.isValidAlpha` static method. For example:
|
|
179
|
+
```js
|
|
180
|
+
const isAlphaOriginal = math.Unit.isValidAlpha
|
|
181
|
+
const isGreekLowercaseChar = function (c) {
|
|
182
|
+
const charCode = c.charCodeAt(0)
|
|
183
|
+
return charCode > 944 && charCode < 970
|
|
184
|
+
}
|
|
185
|
+
math.Unit.isValidAlpha = function (c) {
|
|
186
|
+
return isAlphaOriginal(c) || isGreekLowercaseChar(c)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
math.createUnit('θ', '1 rad')
|
|
190
|
+
math.evaluate('1θ + 3 deg').toNumber('deg') // 60.29577951308232
|
|
191
|
+
```
|
|
192
|
+
|
|
172
193
|
## API
|
|
173
194
|
A `Unit` object contains the following functions:
|
|
174
195
|
|
|
@@ -11,6 +11,7 @@ For matrices, the function is evaluated element wise.
|
|
|
11
11
|
|
|
12
12
|
```js
|
|
13
13
|
math.ceil(x)
|
|
14
|
+
math.ceil(x, n)
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
### Parameters
|
|
@@ -18,6 +19,7 @@ math.ceil(x)
|
|
|
18
19
|
Parameter | Type | Description
|
|
19
20
|
--------- | ---- | -----------
|
|
20
21
|
`x` | number | BigNumber | Fraction | Complex | Array | Matrix | Number to be rounded
|
|
22
|
+
`n` | number | BigNumber | Array | Number of decimals Default value: 0.
|
|
21
23
|
|
|
22
24
|
### Returns
|
|
23
25
|
|
|
@@ -34,10 +36,17 @@ math.ceil(3.8) // returns number 4
|
|
|
34
36
|
math.ceil(-4.2) // returns number -4
|
|
35
37
|
math.ceil(-4.7) // returns number -4
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
math.ceil(3.212, 2) // returns number 3.22
|
|
40
|
+
math.ceil(3.288, 2) // returns number 3.29
|
|
41
|
+
math.ceil(-4.212, 2) // returns number -4.21
|
|
42
|
+
math.ceil(-4.782, 2) // returns number -4.78
|
|
43
|
+
|
|
44
|
+
const c = math.complex(3.24, -2.71)
|
|
38
45
|
math.ceil(c) // returns Complex 4 - 2i
|
|
46
|
+
math.ceil(c, 1) // returns Complex 3.3 - 2.7i
|
|
39
47
|
|
|
40
48
|
math.ceil([3.2, 3.8, -4.7]) // returns Array [4, 4, -4]
|
|
49
|
+
math.ceil([3.21, 3.82, -4.71], 1) // returns Array [3.3, 3.9, -4.7]
|
|
41
50
|
```
|
|
42
51
|
|
|
43
52
|
|
|
@@ -17,6 +17,7 @@ math.fix(x)
|
|
|
17
17
|
Parameter | Type | Description
|
|
18
18
|
--------- | ---- | -----------
|
|
19
19
|
`x` | number | BigNumber | Fraction | Complex | Array | Matrix | Number to be rounded
|
|
20
|
+
`n` | number | BigNumber | Array | Number of decimals Default value: 0.
|
|
20
21
|
|
|
21
22
|
### Returns
|
|
22
23
|
|
|
@@ -33,10 +34,17 @@ math.fix(3.8) // returns number 3
|
|
|
33
34
|
math.fix(-4.2) // returns number -4
|
|
34
35
|
math.fix(-4.7) // returns number -4
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
math.fix(3.12, 1) // returns number 3.1
|
|
38
|
+
math.fix(3.18, 1) // returns number 3.1
|
|
39
|
+
math.fix(-4.12, 1) // returns number -4.1
|
|
40
|
+
math.fix(-4.17, 1) // returns number -4.1
|
|
41
|
+
|
|
42
|
+
const c = math.complex(3.22, -2.78)
|
|
37
43
|
math.fix(c) // returns Complex 3 - 2i
|
|
44
|
+
math.fix(c, 1) // returns Complex 3.2 - 2.7i
|
|
38
45
|
|
|
39
|
-
math.fix([3.2, 3.8, -4.7])
|
|
46
|
+
math.fix([3.2, 3.8, -4.7]) // returns Array [3, 3, -4]
|
|
47
|
+
math.fix([3.2, 3.8, -4.7], 1) // returns Array [3.2, 3.8, -4.7]
|
|
40
48
|
```
|
|
41
49
|
|
|
42
50
|
|
|
@@ -10,6 +10,7 @@ For matrices, the function is evaluated element wise.
|
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
12
|
math.floor(x)
|
|
13
|
+
math.floor(x, n)
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
### Parameters
|
|
@@ -17,6 +18,7 @@ math.floor(x)
|
|
|
17
18
|
Parameter | Type | Description
|
|
18
19
|
--------- | ---- | -----------
|
|
19
20
|
`x` | number | BigNumber | Fraction | Complex | Array | Matrix | Number to be rounded
|
|
21
|
+
`n` | number | BigNumber | Array | Number of decimals Default value: 0.
|
|
20
22
|
|
|
21
23
|
### Returns
|
|
22
24
|
|
|
@@ -33,10 +35,17 @@ math.floor(3.8) // returns number 3
|
|
|
33
35
|
math.floor(-4.2) // returns number -5
|
|
34
36
|
math.floor(-4.7) // returns number -5
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
math.floor(
|
|
38
|
+
math.floor(3.212, 2) // returns number 3.21
|
|
39
|
+
math.floor(3.288, 2) // returns number 3.28
|
|
40
|
+
math.floor(-4.212, 2) // returns number -4.22
|
|
41
|
+
math.floor(-4.782, 2) // returns number -4.79
|
|
38
42
|
|
|
39
|
-
math.
|
|
43
|
+
const c = math.complex(3.24, -2.71)
|
|
44
|
+
math.floor(c) // returns Complex 3 - 3i
|
|
45
|
+
math.floor(c, 1) // returns Complex 3.2 - 2.8i
|
|
46
|
+
|
|
47
|
+
math.floor([3.2, 3.8, -4.7]) // returns Array [3, 3, -5]
|
|
48
|
+
math.floor([3.21, 3.82, -4.71], 1) // returns Array [3.2, 3.8, -4.8]
|
|
40
49
|
```
|
|
41
50
|
|
|
42
51
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
2
|
+
|
|
3
|
+
# Function rotate
|
|
4
|
+
|
|
5
|
+
Rotate a vector of size 1x2 counter-clockwise by a given angle
|
|
6
|
+
Rotate a vector of size 1x3 counter-clockwise by a given angle around the given axis
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
math.rotate(w, theta)
|
|
13
|
+
math.rotate(w, theta, v)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Parameters
|
|
17
|
+
|
|
18
|
+
Parameter | Type | Description
|
|
19
|
+
--------- | ---- | -----------
|
|
20
|
+
`w` | Array | Matrix | Vector to rotate
|
|
21
|
+
`theta` | number | BigNumber | Complex | Unit | Rotation angle
|
|
22
|
+
`v` | Array | Matrix | Rotation axis
|
|
23
|
+
|
|
24
|
+
### Returns
|
|
25
|
+
|
|
26
|
+
Type | Description
|
|
27
|
+
---- | -----------
|
|
28
|
+
Array | Matrix | Multiplication of the rotation matrix and w
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
math.rotate([11, 12], math.pi / 2) // returns matrix([-12, 11])
|
|
35
|
+
math.rotate(matrix([11, 12]), math.pi / 2) // returns matrix([-12, 11])
|
|
36
|
+
|
|
37
|
+
math.rotate([1, 0, 0], unit('90deg'), [0, 0, 1]) // returns matrix([0, 1, 0])
|
|
38
|
+
math.rotate(matrix([1, 0, 0]), unit('90deg'), [0, 0, 1]) // returns matrix([0, 1, 0])
|
|
39
|
+
|
|
40
|
+
math.rotate([1, 0], math.complex(1 + i)) // returns matrix([cos(1 + i) - sin(1 + i), sin(1 + i) + cos(1 + i)])
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## See also
|
|
45
|
+
|
|
46
|
+
[matrix](matrix.md),
|
|
47
|
+
[rotationMatrix](rotationMatrix.md)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
2
|
+
|
|
3
|
+
# Function rotationMatrix
|
|
4
|
+
|
|
5
|
+
Create a 2-dimensional counter-clockwise rotation matrix (2x2) for a given angle (expressed in radians).
|
|
6
|
+
Create a 2-dimensional counter-clockwise rotation matrix (3x3) by a given angle (expressed in radians) around a given axis (1x3).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
math.rotationMatrix(theta)
|
|
13
|
+
math.rotationMatrix(theta, format)
|
|
14
|
+
math.rotationMatrix(theta, [v])
|
|
15
|
+
math.rotationMatrix(theta, [v], format)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Parameters
|
|
19
|
+
|
|
20
|
+
Parameter | Type | Description
|
|
21
|
+
--------- | ---- | -----------
|
|
22
|
+
`theta` | number | BigNumber | Complex | Unit | Rotation angle
|
|
23
|
+
`v` | Array | Matrix | Rotation axis
|
|
24
|
+
`format` | string | Result Matrix storage format
|
|
25
|
+
|
|
26
|
+
### Returns
|
|
27
|
+
|
|
28
|
+
Type | Description
|
|
29
|
+
---- | -----------
|
|
30
|
+
Array | Matrix | Rotation matrix
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
math.rotationMatrix(math.pi / 2) // returns [[0, -1], [1, 0]]
|
|
37
|
+
math.rotationMatrix(math.bignumber(1)) // returns [[bignumber(cos(1)), bignumber(-sin(1))], [bignumber(sin(1)), bignumber(cos(1))]]
|
|
38
|
+
math.rotationMatrix(math.complex(1 + i)) // returns [[cos(1 + i), -sin(1 + i)], [sin(1 + i), cos(1 + i)]]
|
|
39
|
+
math.rotationMatrix(math.unit('1rad')) // returns [[cos(1), -sin(1)], [sin(1), cos(1)]]
|
|
40
|
+
|
|
41
|
+
math.rotationMatrix(math.pi / 2, [0, 1, 0]) // returns [[0, 0, 1], [0, 1, 0], [-1, 0, 0]]
|
|
42
|
+
math.rotationMatrix(math.pi / 2, matrix([0, 1, 0])) // returns matrix([[0, 0, 1], [0, 1, 0], [-1, 0, 0]])
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## See also
|
|
48
|
+
|
|
49
|
+
[matrix](matrix.md),
|
|
50
|
+
[cos](cos.md),
|
|
51
|
+
[sin](sin.md)
|
|
@@ -30,10 +30,14 @@ number | BigNumber | Fraction | Complex | Array | Matri
|
|
|
30
30
|
## Examples
|
|
31
31
|
|
|
32
32
|
```js
|
|
33
|
-
math.round(3.
|
|
34
|
-
math.round(3.
|
|
33
|
+
math.round(3.22) // returns number 3
|
|
34
|
+
math.round(3.82) // returns number 4
|
|
35
35
|
math.round(-4.2) // returns number -4
|
|
36
36
|
math.round(-4.7) // returns number -5
|
|
37
|
+
math.round(3.22, 1) // returns number 3.2
|
|
38
|
+
math.round(3.88, 1) // returns number 3.8
|
|
39
|
+
math.round(-4.21, 1) // returns number -4.2
|
|
40
|
+
math.round(-4.71, 1) // returns number -4.7
|
|
37
41
|
math.round(math.pi, 3) // returns number 3.142
|
|
38
42
|
math.round(123.45678, 2) // returns number 123.46
|
|
39
43
|
|
|
@@ -165,6 +165,8 @@ Function | Description
|
|
|
165
165
|
[math.range(start, end [, step])](functions/range.md) | Create an array from a range.
|
|
166
166
|
[math.reshape(x, sizes)](functions/reshape.md) | Reshape a multi dimensional array to fit the specified dimensions.
|
|
167
167
|
[math.resize(x, size [, defaultValue])](functions/resize.md) | Resize a matrix.
|
|
168
|
+
[math.rotate(w, theta)](functions/rotate.md) | Rotate a vector of size 1x2 counter-clockwise by a given angle Rotate a vector of size 1x3 counter-clockwise by a given angle around the given axis.
|
|
169
|
+
[math.rotationMatrix(theta)](functions/rotationMatrix.md) | Create a 2-dimensional counter-clockwise rotation matrix (2x2) for a given angle (expressed in radians).
|
|
168
170
|
[math.row(value, index)](functions/row.md) | Return a row from a Matrix.
|
|
169
171
|
[math.size(x)](functions/size.md) | Calculate the size of a matrix or scalar.
|
|
170
172
|
[math.sort(x)](functions/sort.md) | Sort the items in a matrix.
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED
|
|
3
3
|
* DON'T MAKE CHANGES HERE
|
|
4
4
|
*/
|
|
5
|
+
import { equalScalarDependencies } from './dependenciesEqualScalar.generated';
|
|
6
|
+
import { matrixDependencies } from './dependenciesMatrix.generated';
|
|
5
7
|
import { roundDependencies } from './dependenciesRound.generated';
|
|
6
8
|
import { typedDependencies } from './dependenciesTyped.generated';
|
|
7
9
|
import { createCeil } from '../../factoriesAny.js';
|
|
8
10
|
export var ceilDependencies = {
|
|
11
|
+
equalScalarDependencies: equalScalarDependencies,
|
|
12
|
+
matrixDependencies: matrixDependencies,
|
|
9
13
|
roundDependencies: roundDependencies,
|
|
10
14
|
typedDependencies: typedDependencies,
|
|
11
15
|
createCeil: createCeil
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
import { ComplexDependencies } from './dependenciesComplexClass.generated';
|
|
6
6
|
import { ceilDependencies } from './dependenciesCeil.generated';
|
|
7
7
|
import { floorDependencies } from './dependenciesFloor.generated';
|
|
8
|
+
import { matrixDependencies } from './dependenciesMatrix.generated';
|
|
8
9
|
import { typedDependencies } from './dependenciesTyped.generated';
|
|
9
10
|
import { createFix } from '../../factoriesAny.js';
|
|
10
11
|
export var fixDependencies = {
|
|
11
12
|
ComplexDependencies: ComplexDependencies,
|
|
12
13
|
ceilDependencies: ceilDependencies,
|
|
13
14
|
floorDependencies: floorDependencies,
|
|
15
|
+
matrixDependencies: matrixDependencies,
|
|
14
16
|
typedDependencies: typedDependencies,
|
|
15
17
|
createFix: createFix
|
|
16
18
|
};
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED
|
|
3
3
|
* DON'T MAKE CHANGES HERE
|
|
4
4
|
*/
|
|
5
|
+
import { equalScalarDependencies } from './dependenciesEqualScalar.generated';
|
|
6
|
+
import { matrixDependencies } from './dependenciesMatrix.generated';
|
|
5
7
|
import { roundDependencies } from './dependenciesRound.generated';
|
|
6
8
|
import { typedDependencies } from './dependenciesTyped.generated';
|
|
7
9
|
import { createFloor } from '../../factoriesAny.js';
|
|
8
10
|
export var floorDependencies = {
|
|
11
|
+
equalScalarDependencies: equalScalarDependencies,
|
|
12
|
+
matrixDependencies: matrixDependencies,
|
|
9
13
|
roundDependencies: roundDependencies,
|
|
10
14
|
typedDependencies: typedDependencies,
|
|
11
15
|
createFloor: createFloor
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTO-GENERATED
|
|
3
|
+
* DON'T MAKE CHANGES HERE
|
|
4
|
+
*/
|
|
5
|
+
import { multiplyDependencies } from './dependenciesMultiply.generated';
|
|
6
|
+
import { rotationMatrixDependencies } from './dependenciesRotationMatrix.generated';
|
|
7
|
+
import { typedDependencies } from './dependenciesTyped.generated';
|
|
8
|
+
import { createRotate } from '../../factoriesAny.js';
|
|
9
|
+
export var rotateDependencies = {
|
|
10
|
+
multiplyDependencies: multiplyDependencies,
|
|
11
|
+
rotationMatrixDependencies: rotationMatrixDependencies,
|
|
12
|
+
typedDependencies: typedDependencies,
|
|
13
|
+
createRotate: createRotate
|
|
14
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTO-GENERATED
|
|
3
|
+
* DON'T MAKE CHANGES HERE
|
|
4
|
+
*/
|
|
5
|
+
import { BigNumberDependencies } from './dependenciesBigNumberClass.generated';
|
|
6
|
+
import { DenseMatrixDependencies } from './dependenciesDenseMatrixClass.generated';
|
|
7
|
+
import { SparseMatrixDependencies } from './dependenciesSparseMatrixClass.generated';
|
|
8
|
+
import { addScalarDependencies } from './dependenciesAddScalar.generated';
|
|
9
|
+
import { cosDependencies } from './dependenciesCos.generated';
|
|
10
|
+
import { matrixDependencies } from './dependenciesMatrix.generated';
|
|
11
|
+
import { multiplyScalarDependencies } from './dependenciesMultiplyScalar.generated';
|
|
12
|
+
import { normDependencies } from './dependenciesNorm.generated';
|
|
13
|
+
import { sinDependencies } from './dependenciesSin.generated';
|
|
14
|
+
import { typedDependencies } from './dependenciesTyped.generated';
|
|
15
|
+
import { unaryMinusDependencies } from './dependenciesUnaryMinus.generated';
|
|
16
|
+
import { createRotationMatrix } from '../../factoriesAny.js';
|
|
17
|
+
export var rotationMatrixDependencies = {
|
|
18
|
+
BigNumberDependencies: BigNumberDependencies,
|
|
19
|
+
DenseMatrixDependencies: DenseMatrixDependencies,
|
|
20
|
+
SparseMatrixDependencies: SparseMatrixDependencies,
|
|
21
|
+
addScalarDependencies: addScalarDependencies,
|
|
22
|
+
cosDependencies: cosDependencies,
|
|
23
|
+
matrixDependencies: matrixDependencies,
|
|
24
|
+
multiplyScalarDependencies: multiplyScalarDependencies,
|
|
25
|
+
normDependencies: normDependencies,
|
|
26
|
+
sinDependencies: sinDependencies,
|
|
27
|
+
typedDependencies: typedDependencies,
|
|
28
|
+
unaryMinusDependencies: unaryMinusDependencies,
|
|
29
|
+
createRotationMatrix: createRotationMatrix
|
|
30
|
+
};
|
|
@@ -82,6 +82,8 @@ export { onesDependencies } from './dependenciesAny/dependenciesOnes.generated';
|
|
|
82
82
|
export { rangeDependencies } from './dependenciesAny/dependenciesRange.generated';
|
|
83
83
|
export { reshapeDependencies } from './dependenciesAny/dependenciesReshape.generated';
|
|
84
84
|
export { resizeDependencies } from './dependenciesAny/dependenciesResize.generated';
|
|
85
|
+
export { rotateDependencies } from './dependenciesAny/dependenciesRotate.generated';
|
|
86
|
+
export { rotationMatrixDependencies } from './dependenciesAny/dependenciesRotationMatrix.generated';
|
|
85
87
|
export { rowDependencies } from './dependenciesAny/dependenciesRow.generated';
|
|
86
88
|
export { sizeDependencies } from './dependenciesAny/dependenciesSize.generated';
|
|
87
89
|
export { squeezeDependencies } from './dependenciesAny/dependenciesSqueeze.generated';
|
|
@@ -5,9 +5,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
5
5
|
* DON'T MAKE CHANGES HERE
|
|
6
6
|
*/
|
|
7
7
|
import { config } from './configReadonly';
|
|
8
|
-
import { createNode, createArrayNode, createBlockNode, createConstantNode, createObjectNode, createParenthesisNode, createRelationalNode, createChainClass, createReviver, createConditionalNode, createOperatorNode, createRangeNode, createFunctionAssignmentNode, createChain, createAccessorNode, createIndexNode, createAssignmentNode, createSymbolNode, createFunctionNode, createParse, createEvaluate, createHelpClass,
|
|
8
|
+
import { createNode, createArrayNode, createBlockNode, createConstantNode, createObjectNode, createParenthesisNode, createRelationalNode, createChainClass, createReviver, createConditionalNode, createOperatorNode, createRangeNode, createFunctionAssignmentNode, createChain, createAccessorNode, createIndexNode, createAssignmentNode, createSymbolNode, createFunctionNode, createParse, createEvaluate, createHelpClass, createParserClass, createHelp, createCompile, createSimplify, createRationalize, createParser, createDerivative, createApplyTransform, createFilterTransform, createMapTransform, createForEachTransform, createSubsetTransform, createIndexTransform, createConcatTransform, createMaxTransform, createMinTransform, createSumTransform, createColumnTransform, createRangeTransform, createDiffTransform, createRowTransform, createMeanTransform, createVarianceTransform, createStdTransform } from '../factoriesAny';
|
|
9
9
|
import { ResultSet, Complex, Range, _false, _null, _true, BigNumber, Matrix, replacer, i, LN10, LOG10E, _NaN, pi, SQRT1_2 // eslint-disable-line camelcase
|
|
10
|
-
, tau, efimovFactor, fineStructure, sackurTetrode, weakMixingAngle, Fraction, e, _Infinity, LOG2E, version, DenseMatrix, phi, typed, isInteger, isNumeric, isPositive, isNaN, equalScalar, number, boolean as _boolean, complex, splitUnit, unaryPlus, apply, cube, expm1, log10, multiplyScalar, sign, square, bitNot, arg, im, not, filter, forEach, map, erf, format, oct, print, isPrime, acos, acot, acsc, asec, asin, atan, atanh, cosh, coth, csch, sech, sinh, tanh, combinations, pickRandom, randomInt, LN2, clone, hasNumericValue, typeOf, string, fraction, unaryMinus, addScalar, exp, log2, sqrt, conj, getMatrixDataType, mode, bin, acosh, acsch, asinh, cos, csc, sin, combinationsWithRep, random, SQRT2, isNegative, SparseMatrix, matrix, cbrt, gcd, mod, nthRoot, xgcd, bitAnd, bitXor, or, concat, diag, identity, ones, reshape, size, subset, zeros, hex, round, leftShift, rightLogShift, compare, compareText, smaller, larger, unequal, ImmutableDenseMatrix, FibonacciHeap, sparse, acoth, atan2, sec, add, dot, composition, isZero, abs, floor, multiply, dotMultiply, re, flatten, resize, squeeze, to, pow, dotPow, rightArithShift, compareNatural, equalText, largerEq, partitionSelect, Index, asech, tan, setDifference, setIntersect, setMultiplicity, setSize, trace, quantileSeq, gamma, bignumber, lcm, bitOr, kron, transpose, numeric, and, smallerEq, sort, min, cot, setDistinct, setPowerset, index, sum, factorial, permutations, ceil, subtract, cross, range,
|
|
10
|
+
, tau, efimovFactor, fineStructure, sackurTetrode, weakMixingAngle, Fraction, e, _Infinity, LOG2E, version, DenseMatrix, phi, typed, isInteger, isNumeric, isPositive, isNaN, equalScalar, number, boolean as _boolean, complex, splitUnit, unaryPlus, apply, cube, expm1, log10, multiplyScalar, sign, square, bitNot, arg, im, not, filter, forEach, map, erf, format, oct, print, isPrime, acos, acot, acsc, asec, asin, atan, atanh, cosh, coth, csch, sech, sinh, tanh, combinations, pickRandom, randomInt, LN2, clone, hasNumericValue, typeOf, string, fraction, unaryMinus, addScalar, exp, log2, sqrt, conj, getMatrixDataType, mode, bin, acosh, acsch, asinh, cos, csc, sin, combinationsWithRep, random, SQRT2, isNegative, SparseMatrix, matrix, cbrt, gcd, mod, nthRoot, xgcd, bitAnd, bitXor, or, concat, diag, identity, ones, reshape, size, subset, zeros, hex, round, leftShift, rightLogShift, compare, compareText, smaller, larger, unequal, ImmutableDenseMatrix, FibonacciHeap, sparse, acoth, atan2, sec, add, dot, composition, isZero, abs, floor, multiply, dotMultiply, re, flatten, resize, squeeze, to, pow, dotPow, rightArithShift, compareNatural, equalText, largerEq, partitionSelect, Index, asech, tan, setDifference, setIntersect, setMultiplicity, setSize, trace, quantileSeq, gamma, bignumber, lcm, bitOr, kron, transpose, numeric, and, smallerEq, sort, min, cot, setDistinct, setPowerset, index, sum, factorial, permutations, ceil, subtract, cross, range, row, prod, equal, max, setCartesian, setSymDifference, fix, column, ctranspose, deepEqual, setIsSubset, xor, divideScalar, nthRoots, lsolve, lsolveAll, Spa, setUnion, lup, slu, det, distance, stirlingS2, catalan, diff, log, dotDivide, usolveAll, hypot, qr, inv, expm, divide, mean, variance, kldivergence, bellNumbers, log1p, Unit, createUnit, eigs, intersect, std, atomicMass, bohrMagneton, boltzmann, conductanceQuantum, deuteronMass, electronMass, faraday, firstRadiation, gravitationConstant, hartreeEnergy, klitzing, magneticConstant, molarMass, molarPlanckConstant, neutronMass, planckCharge, planckLength, planckTemperature, protonMass, reducedPlanckConstant, secondRadiation, stefanBoltzmann, vacuumImpedance, usolve, norm, lusolve, sqrtm, multinomial, avogadro, classicalElectronRadius, electricConstant, fermiCoupling, gravity, loschmidt, molarMassC12, nuclearMagneton, planckMass, quantumOfCirculation, speedOfLight, wienDisplacement, rotationMatrix, median, bohrRadius, elementaryCharge, inverseConductanceQuantum, molarVolume, planckTime, thomsonCrossSection, rotate, mad, coulomb, magneticFluxQuantum, rydberg, unit, gasConstant, planckConstant } from './pureFunctionsAny.generated';
|
|
11
11
|
var math = {}; // NOT pure!
|
|
12
12
|
|
|
13
13
|
var mathWithTransform = {}; // NOT pure!
|
|
@@ -110,6 +110,18 @@ export var evaluate = createEvaluate({
|
|
|
110
110
|
export var Help = createHelpClass({
|
|
111
111
|
parse: parse
|
|
112
112
|
});
|
|
113
|
+
export var Parser = createParserClass({
|
|
114
|
+
parse: parse
|
|
115
|
+
});
|
|
116
|
+
export var help = createHelp({
|
|
117
|
+
Help: Help,
|
|
118
|
+
mathWithTransform: mathWithTransform,
|
|
119
|
+
typed: typed
|
|
120
|
+
});
|
|
121
|
+
export var compile = createCompile({
|
|
122
|
+
parse: parse,
|
|
123
|
+
typed: typed
|
|
124
|
+
});
|
|
113
125
|
export var simplify = createSimplify({
|
|
114
126
|
bignumber: bignumber,
|
|
115
127
|
fraction: fraction,
|
|
@@ -151,18 +163,10 @@ export var rationalize = createRationalize({
|
|
|
151
163
|
subtract: subtract,
|
|
152
164
|
typed: typed
|
|
153
165
|
});
|
|
154
|
-
export var
|
|
155
|
-
|
|
156
|
-
typed: typed
|
|
157
|
-
});
|
|
158
|
-
export var help = createHelp({
|
|
159
|
-
Help: Help,
|
|
160
|
-
mathWithTransform: mathWithTransform,
|
|
166
|
+
export var parser = createParser({
|
|
167
|
+
Parser: Parser,
|
|
161
168
|
typed: typed
|
|
162
169
|
});
|
|
163
|
-
export var Parser = createParserClass({
|
|
164
|
-
parse: parse
|
|
165
|
-
});
|
|
166
170
|
export var derivative = createDerivative({
|
|
167
171
|
ConstantNode: ConstantNode,
|
|
168
172
|
FunctionNode: FunctionNode,
|
|
@@ -177,10 +181,6 @@ export var derivative = createDerivative({
|
|
|
177
181
|
simplify: simplify,
|
|
178
182
|
typed: typed
|
|
179
183
|
});
|
|
180
|
-
export var parser = createParser({
|
|
181
|
-
Parser: Parser,
|
|
182
|
-
typed: typed
|
|
183
|
-
});
|
|
184
184
|
|
|
185
185
|
_extends(math, {
|
|
186
186
|
reviver: reviver,
|
|
@@ -358,42 +358,47 @@ _extends(math, {
|
|
|
358
358
|
subtract: subtract,
|
|
359
359
|
cross: cross,
|
|
360
360
|
range: range,
|
|
361
|
+
row: row,
|
|
362
|
+
prod: prod,
|
|
363
|
+
equal: equal,
|
|
364
|
+
max: max,
|
|
365
|
+
setCartesian: setCartesian,
|
|
366
|
+
setSymDifference: setSymDifference,
|
|
367
|
+
fix: fix,
|
|
368
|
+
column: column,
|
|
361
369
|
ctranspose: ctranspose,
|
|
370
|
+
deepEqual: deepEqual,
|
|
371
|
+
setIsSubset: setIsSubset,
|
|
372
|
+
xor: xor,
|
|
362
373
|
divideScalar: divideScalar,
|
|
363
374
|
nthRoots: nthRoots,
|
|
364
375
|
lsolve: lsolve,
|
|
365
376
|
lsolveAll: lsolveAll,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
hypot: hypot,
|
|
371
|
-
qr: qr,
|
|
377
|
+
setUnion: setUnion,
|
|
378
|
+
lup: lup,
|
|
379
|
+
slu: slu,
|
|
380
|
+
det: det,
|
|
372
381
|
distance: distance,
|
|
373
382
|
stirlingS2: stirlingS2,
|
|
374
383
|
catalan: catalan,
|
|
375
|
-
|
|
376
|
-
column: column,
|
|
377
|
-
row: row,
|
|
384
|
+
diff: diff,
|
|
378
385
|
log: log,
|
|
379
386
|
dotDivide: dotDivide,
|
|
380
387
|
usolveAll: usolveAll,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
det: det,
|
|
384
|
-
intersect: intersect,
|
|
385
|
-
bellNumbers: bellNumbers,
|
|
386
|
-
xor: xor,
|
|
387
|
-
prod: prod,
|
|
388
|
-
usolve: usolve,
|
|
389
|
-
createUnit: createUnit,
|
|
390
|
-
slu: slu,
|
|
388
|
+
hypot: hypot,
|
|
389
|
+
qr: qr,
|
|
391
390
|
inv: inv,
|
|
392
391
|
expm: expm,
|
|
393
392
|
divide: divide,
|
|
394
|
-
|
|
393
|
+
mean: mean,
|
|
395
394
|
variance: variance,
|
|
396
395
|
kldivergence: kldivergence,
|
|
396
|
+
bellNumbers: bellNumbers,
|
|
397
|
+
log1p: log1p,
|
|
398
|
+
createUnit: createUnit,
|
|
399
|
+
eigs: eigs,
|
|
400
|
+
intersect: intersect,
|
|
401
|
+
std: std,
|
|
397
402
|
atomicMass: atomicMass,
|
|
398
403
|
bohrMagneton: bohrMagneton,
|
|
399
404
|
boltzmann: boltzmann,
|
|
@@ -417,13 +422,11 @@ _extends(math, {
|
|
|
417
422
|
secondRadiation: secondRadiation,
|
|
418
423
|
stefanBoltzmann: stefanBoltzmann,
|
|
419
424
|
vacuumImpedance: vacuumImpedance,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
setUnion: setUnion,
|
|
425
|
+
usolve: usolve,
|
|
426
|
+
norm: norm,
|
|
423
427
|
lusolve: lusolve,
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
std: std,
|
|
428
|
+
sqrtm: sqrtm,
|
|
429
|
+
multinomial: multinomial,
|
|
427
430
|
avogadro: avogadro,
|
|
428
431
|
classicalElectronRadius: classicalElectronRadius,
|
|
429
432
|
electricConstant: electricConstant,
|
|
@@ -436,31 +439,30 @@ _extends(math, {
|
|
|
436
439
|
quantumOfCirculation: quantumOfCirculation,
|
|
437
440
|
speedOfLight: speedOfLight,
|
|
438
441
|
wienDisplacement: wienDisplacement,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
sqrtm: sqrtm,
|
|
442
|
-
multinomial: multinomial,
|
|
442
|
+
rotationMatrix: rotationMatrix,
|
|
443
|
+
median: median,
|
|
443
444
|
bohrRadius: bohrRadius,
|
|
444
445
|
elementaryCharge: elementaryCharge,
|
|
445
446
|
inverseConductanceQuantum: inverseConductanceQuantum,
|
|
446
447
|
molarVolume: molarVolume,
|
|
447
448
|
planckTime: planckTime,
|
|
448
449
|
thomsonCrossSection: thomsonCrossSection,
|
|
449
|
-
|
|
450
|
+
rotate: rotate,
|
|
451
|
+
parse: parse,
|
|
452
|
+
evaluate: evaluate,
|
|
450
453
|
mad: mad,
|
|
451
454
|
coulomb: coulomb,
|
|
452
455
|
magneticFluxQuantum: magneticFluxQuantum,
|
|
453
456
|
rydberg: rydberg,
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
unit: unit,
|
|
458
|
+
help: help,
|
|
459
|
+
gasConstant: gasConstant,
|
|
460
|
+
compile: compile,
|
|
456
461
|
simplify: simplify,
|
|
457
462
|
rationalize: rationalize,
|
|
463
|
+
parser: parser,
|
|
458
464
|
planckConstant: planckConstant,
|
|
459
|
-
compile: compile,
|
|
460
|
-
help: help,
|
|
461
|
-
gasConstant: gasConstant,
|
|
462
465
|
derivative: derivative,
|
|
463
|
-
parser: parser,
|
|
464
466
|
config: config
|
|
465
467
|
});
|
|
466
468
|
|