mathjs 13.0.2 → 13.1.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 +26 -1
- package/lib/browser/math.js +1 -1
- package/lib/browser/math.js.LICENSE.txt +2 -2
- package/lib/browser/math.js.map +1 -1
- package/lib/cjs/core/create.js +12 -9
- package/lib/cjs/core/function/import.js +1 -1
- package/lib/cjs/core/function/typed.js +3 -4
- package/lib/cjs/entry/dependenciesAny/dependenciesFlatten.generated.js +0 -2
- package/lib/cjs/entry/dependenciesAny/dependenciesSqueeze.generated.js +0 -2
- package/lib/cjs/entry/impureFunctionsAny.generated.js +2 -2
- package/lib/cjs/entry/pureFunctionsAny.generated.js +6 -8
- package/lib/cjs/entry/typeChecks.js +18 -0
- package/lib/cjs/expression/embeddedDocs/embeddedDocs.js +2 -2
- package/lib/cjs/expression/embeddedDocs/function/arithmetic/hypot.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/diff.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/fft.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/ifft.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/kron.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/map.js +3 -3
- package/lib/cjs/expression/embeddedDocs/function/special/zeta.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/statistics/quantileSeq.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/trigonometry/acoth.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/trigonometry/acsch.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/utils/clone.js +1 -1
- package/lib/cjs/expression/function/evaluate.js +5 -0
- package/lib/cjs/expression/node/FunctionNode.js +1 -1
- package/lib/cjs/expression/transform/filter.transform.js +2 -2
- package/lib/cjs/expression/transform/map.transform.js +104 -37
- package/lib/cjs/expression/transform/utils/dimToZeroBase.js +23 -0
- package/lib/cjs/expression/transform/utils/lastDimToZeroBase.js +3 -4
- package/lib/cjs/function/arithmetic/hypot.js +3 -3
- package/lib/cjs/function/matrix/apply.js +1 -1
- package/lib/cjs/function/matrix/fft.js +3 -3
- package/lib/cjs/function/matrix/filter.js +2 -2
- package/lib/cjs/function/matrix/flatten.js +5 -6
- package/lib/cjs/function/matrix/ifft.js +2 -2
- package/lib/cjs/function/matrix/kron.js +4 -4
- package/lib/cjs/function/matrix/map.js +109 -18
- package/lib/cjs/function/matrix/size.js +7 -7
- package/lib/cjs/function/matrix/squeeze.js +3 -4
- package/lib/cjs/function/probability/random.js +1 -1
- package/lib/cjs/function/probability/randomInt.js +1 -1
- package/lib/cjs/function/statistics/cumsum.js +2 -2
- package/lib/cjs/function/trigonometry/acoth.js +2 -2
- package/lib/cjs/function/trigonometry/acsch.js +2 -2
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/type/matrix/DenseMatrix.js +3 -28
- package/lib/cjs/type/matrix/SparseMatrix.js +5 -8
- package/lib/cjs/type/unit/Unit.js +57 -114
- package/lib/cjs/utils/array.js +27 -0
- package/lib/cjs/utils/collection.js +1 -1
- package/lib/cjs/utils/function.js +0 -14
- package/lib/cjs/utils/is.js +27 -0
- package/lib/cjs/utils/map.js +2 -20
- package/lib/cjs/version.js +1 -1
- package/lib/esm/core/create.js +9 -6
- package/lib/esm/core/function/import.js +1 -1
- package/lib/esm/core/function/typed.js +2 -3
- package/lib/esm/entry/dependenciesAny/dependenciesFlatten.generated.js +0 -2
- package/lib/esm/entry/dependenciesAny/dependenciesSqueeze.generated.js +0 -2
- package/lib/esm/entry/impureFunctionsAny.generated.js +3 -3
- package/lib/esm/entry/pureFunctionsAny.generated.js +7 -9
- package/lib/esm/entry/typeChecks.js +1 -1
- package/lib/esm/expression/embeddedDocs/embeddedDocs.js +2 -2
- package/lib/esm/expression/embeddedDocs/function/arithmetic/hypot.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/diff.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/fft.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/ifft.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/kron.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/map.js +3 -3
- package/lib/esm/expression/embeddedDocs/function/special/zeta.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/statistics/quantileSeq.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/trigonometry/acoth.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/trigonometry/acsch.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/utils/clone.js +1 -1
- package/lib/esm/expression/function/compile.js +1 -1
- package/lib/esm/expression/function/evaluate.js +8 -3
- package/lib/esm/expression/node/FunctionNode.js +1 -1
- package/lib/esm/expression/parse.js +2 -2
- package/lib/esm/expression/transform/filter.transform.js +4 -4
- package/lib/esm/expression/transform/forEach.transform.js +4 -4
- package/lib/esm/expression/transform/map.transform.js +104 -37
- package/lib/esm/expression/transform/print.transform.js +2 -2
- package/lib/esm/expression/transform/utils/dimToZeroBase.js +16 -0
- package/lib/esm/expression/transform/utils/lastDimToZeroBase.js +4 -6
- package/lib/esm/function/algebra/decomposition/slu.js +1 -1
- package/lib/esm/function/algebra/derivative.js +15 -15
- package/lib/esm/function/algebra/lyap.js +4 -4
- package/lib/esm/function/algebra/simplify/util.js +3 -3
- package/lib/esm/function/algebra/simplifyConstant.js +9 -9
- package/lib/esm/function/algebra/solver/lsolve.js +3 -3
- package/lib/esm/function/algebra/solver/lsolveAll.js +3 -3
- package/lib/esm/function/algebra/solver/lusolve.js +5 -5
- package/lib/esm/function/algebra/solver/usolve.js +3 -3
- package/lib/esm/function/algebra/solver/usolveAll.js +3 -3
- package/lib/esm/function/algebra/sylvester.js +7 -7
- package/lib/esm/function/arithmetic/addScalar.js +4 -4
- package/lib/esm/function/arithmetic/ceil.js +6 -6
- package/lib/esm/function/arithmetic/divide.js +5 -5
- package/lib/esm/function/arithmetic/divideScalar.js +5 -5
- package/lib/esm/function/arithmetic/fix.js +5 -5
- package/lib/esm/function/arithmetic/floor.js +6 -6
- package/lib/esm/function/arithmetic/hypot.js +3 -3
- package/lib/esm/function/arithmetic/mod.js +3 -3
- package/lib/esm/function/arithmetic/multiply.js +7 -7
- package/lib/esm/function/arithmetic/multiplyScalar.js +4 -4
- package/lib/esm/function/arithmetic/norm.js +2 -2
- package/lib/esm/function/arithmetic/pow.js +6 -6
- package/lib/esm/function/arithmetic/round.js +7 -7
- package/lib/esm/function/arithmetic/subtractScalar.js +4 -4
- package/lib/esm/function/arithmetic/xgcd.js +1 -1
- package/lib/esm/function/combinatorics/bellNumbers.js +1 -1
- package/lib/esm/function/combinatorics/catalan.js +1 -1
- package/lib/esm/function/combinatorics/composition.js +1 -1
- package/lib/esm/function/combinatorics/stirlingS2.js +1 -1
- package/lib/esm/function/geometry/distance.js +4 -4
- package/lib/esm/function/geometry/intersect.js +2 -2
- package/lib/esm/function/logical/and.js +2 -2
- package/lib/esm/function/logical/or.js +2 -2
- package/lib/esm/function/logical/xor.js +2 -2
- package/lib/esm/function/matrix/apply.js +2 -2
- package/lib/esm/function/matrix/column.js +1 -1
- package/lib/esm/function/matrix/concat.js +1 -1
- package/lib/esm/function/matrix/count.js +1 -1
- package/lib/esm/function/matrix/cross.js +3 -3
- package/lib/esm/function/matrix/diag.js +10 -10
- package/lib/esm/function/matrix/diff.js +2 -2
- package/lib/esm/function/matrix/eigs.js +3 -3
- package/lib/esm/function/matrix/fft.js +3 -3
- package/lib/esm/function/matrix/filter.js +4 -4
- package/lib/esm/function/matrix/flatten.js +5 -6
- package/lib/esm/function/matrix/forEach.js +4 -4
- package/lib/esm/function/matrix/identity.js +6 -6
- package/lib/esm/function/matrix/ifft.js +3 -3
- package/lib/esm/function/matrix/inv.js +1 -1
- package/lib/esm/function/matrix/kron.js +7 -7
- package/lib/esm/function/matrix/map.js +110 -19
- package/lib/esm/function/matrix/matrixFromFunction.js +6 -6
- package/lib/esm/function/matrix/ones.js +2 -2
- package/lib/esm/function/matrix/partitionSelect.js +2 -2
- package/lib/esm/function/matrix/pinv.js +1 -1
- package/lib/esm/function/matrix/range.js +10 -10
- package/lib/esm/function/matrix/reshape.js +2 -2
- package/lib/esm/function/matrix/rotate.js +4 -4
- package/lib/esm/function/matrix/rotationMatrix.js +6 -6
- package/lib/esm/function/matrix/row.js +1 -1
- package/lib/esm/function/matrix/size.js +8 -8
- package/lib/esm/function/matrix/sort.js +4 -4
- package/lib/esm/function/matrix/sqrtm.js +1 -1
- package/lib/esm/function/matrix/squeeze.js +3 -4
- package/lib/esm/function/matrix/subset.js +2 -2
- package/lib/esm/function/matrix/zeros.js +2 -2
- package/lib/esm/function/probability/combinations.js +1 -1
- package/lib/esm/function/probability/combinationsWithRep.js +2 -2
- package/lib/esm/function/probability/kldivergence.js +4 -4
- package/lib/esm/function/probability/multinomial.js +1 -1
- package/lib/esm/function/probability/permutations.js +2 -2
- package/lib/esm/function/probability/pickRandom.js +6 -6
- package/lib/esm/function/probability/random.js +1 -1
- package/lib/esm/function/probability/randomInt.js +1 -1
- package/lib/esm/function/relational/compare.js +6 -6
- package/lib/esm/function/relational/deepEqual.js +1 -1
- package/lib/esm/function/relational/equal.js +1 -1
- package/lib/esm/function/relational/equalScalar.js +7 -7
- package/lib/esm/function/relational/equalText.js +1 -1
- package/lib/esm/function/relational/larger.js +3 -3
- package/lib/esm/function/relational/largerEq.js +4 -4
- package/lib/esm/function/relational/smaller.js +3 -3
- package/lib/esm/function/relational/smallerEq.js +3 -3
- package/lib/esm/function/relational/unequal.js +1 -1
- package/lib/esm/function/set/setCartesian.js +1 -1
- package/lib/esm/function/set/setDifference.js +1 -1
- package/lib/esm/function/set/setDistinct.js +1 -1
- package/lib/esm/function/set/setIntersect.js +1 -1
- package/lib/esm/function/set/setIsSubset.js +1 -1
- package/lib/esm/function/set/setMultiplicity.js +1 -1
- package/lib/esm/function/set/setPowerset.js +1 -1
- package/lib/esm/function/set/setSize.js +2 -2
- package/lib/esm/function/set/setSymDifference.js +1 -1
- package/lib/esm/function/set/setUnion.js +1 -1
- package/lib/esm/function/signal/freqz.js +6 -6
- package/lib/esm/function/statistics/corr.js +2 -2
- package/lib/esm/function/statistics/cumsum.js +3 -3
- package/lib/esm/function/statistics/max.js +1 -1
- package/lib/esm/function/statistics/median.js +3 -3
- package/lib/esm/function/statistics/min.js +1 -1
- package/lib/esm/function/statistics/prod.js +1 -1
- package/lib/esm/function/statistics/variance.js +2 -2
- package/lib/esm/function/string/bin.js +2 -2
- package/lib/esm/function/string/hex.js +2 -2
- package/lib/esm/function/string/oct.js +2 -2
- package/lib/esm/function/trigonometry/acoth.js +2 -2
- package/lib/esm/function/trigonometry/acsch.js +2 -2
- package/lib/esm/type/bigint.js +1 -1
- package/lib/esm/type/complex/function/complex.js +2 -2
- package/lib/esm/type/fraction/function/fraction.js +1 -1
- package/lib/esm/type/matrix/DenseMatrix.js +13 -38
- package/lib/esm/type/matrix/SparseMatrix.js +5 -8
- package/lib/esm/type/matrix/function/index.js +1 -1
- package/lib/esm/type/matrix/function/matrix.js +1 -1
- package/lib/esm/type/matrix/function/sparse.js +2 -2
- package/lib/esm/type/number.js +1 -1
- package/lib/esm/type/unit/Unit.js +57 -114
- package/lib/esm/type/unit/function/createUnit.js +3 -3
- package/lib/esm/type/unit/function/splitUnit.js +1 -1
- package/lib/esm/type/unit/function/unit.js +2 -2
- package/lib/esm/utils/array.js +26 -0
- package/lib/esm/utils/collection.js +1 -1
- package/lib/esm/utils/function.js +0 -13
- package/lib/esm/utils/is.js +24 -0
- package/lib/esm/utils/map.js +2 -19
- package/lib/esm/version.js +1 -1
- package/package.json +19 -19
- package/types/index.d.ts +108 -25
|
@@ -430,7 +430,7 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
430
430
|
* Return the type of the value of this unit
|
|
431
431
|
*
|
|
432
432
|
* @memberof Unit
|
|
433
|
-
* @
|
|
433
|
+
* @return {string} type of the value of the unit
|
|
434
434
|
*/
|
|
435
435
|
Unit.prototype.valueType = function () {
|
|
436
436
|
return (0, _is.typeOf)(this.value);
|
|
@@ -440,6 +440,7 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
440
440
|
* Return whether the unit is derived (such as m/s, or cm^2, but not N)
|
|
441
441
|
* @memberof Unit
|
|
442
442
|
* @return {boolean} True if the unit is derived
|
|
443
|
+
* @private
|
|
443
444
|
*/
|
|
444
445
|
Unit.prototype._isDerived = function () {
|
|
445
446
|
if (this.units.length === 0) {
|
|
@@ -552,7 +553,7 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
552
553
|
* check if this unit has given base unit
|
|
553
554
|
* If this unit is a derived unit, this will ALWAYS return false, since by definition base units are not derived.
|
|
554
555
|
* @memberof Unit
|
|
555
|
-
* @param {
|
|
556
|
+
* @param {BASE_UNIT | string | undefined} base
|
|
556
557
|
*/
|
|
557
558
|
Unit.prototype.hasBase = function (base) {
|
|
558
559
|
if (typeof base === 'string') {
|
|
@@ -2323,34 +2324,34 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
2323
2324
|
name: 'minim',
|
|
2324
2325
|
base: BASE_UNITS.VOLUME,
|
|
2325
2326
|
prefixes: PREFIXES.NONE,
|
|
2326
|
-
value: 0.
|
|
2327
|
+
value: 0.000000061611519921875,
|
|
2327
2328
|
offset: 0
|
|
2328
2329
|
},
|
|
2329
|
-
//
|
|
2330
|
+
// 1/61440 gallons
|
|
2330
2331
|
fluiddram: {
|
|
2331
2332
|
name: 'fluiddram',
|
|
2332
2333
|
base: BASE_UNITS.VOLUME,
|
|
2333
2334
|
prefixes: PREFIXES.NONE,
|
|
2334
|
-
value: 0.
|
|
2335
|
+
value: 0.0000036966911953125,
|
|
2335
2336
|
offset: 0
|
|
2336
2337
|
},
|
|
2337
|
-
//
|
|
2338
|
+
// 1/1024 gallons
|
|
2338
2339
|
fluidounce: {
|
|
2339
2340
|
name: 'fluidounce',
|
|
2340
2341
|
base: BASE_UNITS.VOLUME,
|
|
2341
2342
|
prefixes: PREFIXES.NONE,
|
|
2342
|
-
value: 0.
|
|
2343
|
+
value: 0.0000295735295625,
|
|
2343
2344
|
offset: 0
|
|
2344
2345
|
},
|
|
2345
|
-
//
|
|
2346
|
+
// 1/128 gallons
|
|
2346
2347
|
gill: {
|
|
2347
2348
|
name: 'gill',
|
|
2348
2349
|
base: BASE_UNITS.VOLUME,
|
|
2349
2350
|
prefixes: PREFIXES.NONE,
|
|
2350
|
-
value: 0.
|
|
2351
|
+
value: 0.00011829411825,
|
|
2351
2352
|
offset: 0
|
|
2352
2353
|
},
|
|
2353
|
-
//
|
|
2354
|
+
// 1/32 gallons
|
|
2354
2355
|
cc: {
|
|
2355
2356
|
name: 'cc',
|
|
2356
2357
|
base: BASE_UNITS.VOLUME,
|
|
@@ -2363,133 +2364,58 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
2363
2364
|
name: 'cup',
|
|
2364
2365
|
base: BASE_UNITS.VOLUME,
|
|
2365
2366
|
prefixes: PREFIXES.NONE,
|
|
2366
|
-
value: 0.
|
|
2367
|
+
value: 0.0002365882365,
|
|
2367
2368
|
offset: 0
|
|
2368
2369
|
},
|
|
2369
|
-
//
|
|
2370
|
+
// 1/16 gallons
|
|
2370
2371
|
pint: {
|
|
2371
2372
|
name: 'pint',
|
|
2372
2373
|
base: BASE_UNITS.VOLUME,
|
|
2373
2374
|
prefixes: PREFIXES.NONE,
|
|
2374
|
-
value: 0.
|
|
2375
|
+
value: 0.000473176473,
|
|
2375
2376
|
offset: 0
|
|
2376
2377
|
},
|
|
2377
|
-
//
|
|
2378
|
+
// 1/8 gallons
|
|
2378
2379
|
quart: {
|
|
2379
2380
|
name: 'quart',
|
|
2380
2381
|
base: BASE_UNITS.VOLUME,
|
|
2381
2382
|
prefixes: PREFIXES.NONE,
|
|
2382
|
-
value: 0.
|
|
2383
|
+
value: 0.000946352946,
|
|
2383
2384
|
offset: 0
|
|
2384
2385
|
},
|
|
2385
|
-
//
|
|
2386
|
+
// 1/4 gallons
|
|
2386
2387
|
gallon: {
|
|
2387
2388
|
name: 'gallon',
|
|
2388
2389
|
base: BASE_UNITS.VOLUME,
|
|
2389
2390
|
prefixes: PREFIXES.NONE,
|
|
2390
|
-
value: 0.
|
|
2391
|
+
value: 0.003785411784,
|
|
2391
2392
|
offset: 0
|
|
2392
2393
|
},
|
|
2393
|
-
// 3.
|
|
2394
|
+
// 3.785411784 L
|
|
2394
2395
|
beerbarrel: {
|
|
2395
2396
|
name: 'beerbarrel',
|
|
2396
2397
|
base: BASE_UNITS.VOLUME,
|
|
2397
2398
|
prefixes: PREFIXES.NONE,
|
|
2398
|
-
value: 0.
|
|
2399
|
+
value: 0.117347765304,
|
|
2399
2400
|
offset: 0
|
|
2400
2401
|
},
|
|
2401
|
-
//
|
|
2402
|
+
// 31 gallons
|
|
2402
2403
|
oilbarrel: {
|
|
2403
2404
|
name: 'oilbarrel',
|
|
2404
2405
|
base: BASE_UNITS.VOLUME,
|
|
2405
2406
|
prefixes: PREFIXES.NONE,
|
|
2406
|
-
value: 0.
|
|
2407
|
+
value: 0.158987294928,
|
|
2407
2408
|
offset: 0
|
|
2408
2409
|
},
|
|
2409
|
-
//
|
|
2410
|
+
// 42 gallons
|
|
2410
2411
|
hogshead: {
|
|
2411
2412
|
name: 'hogshead',
|
|
2412
2413
|
base: BASE_UNITS.VOLUME,
|
|
2413
2414
|
prefixes: PREFIXES.NONE,
|
|
2414
|
-
value: 0.
|
|
2415
|
+
value: 0.238480942392,
|
|
2415
2416
|
offset: 0
|
|
2416
2417
|
},
|
|
2417
|
-
//
|
|
2418
|
-
|
|
2419
|
-
// {name: 'min', base: BASE_UNITS.VOLUME, prefixes: PREFIXES.NONE, value: 0.00000006161152, offset: 0}, // 0.06161152 mL // min is already in use as minute
|
|
2420
|
-
fldr: {
|
|
2421
|
-
name: 'fldr',
|
|
2422
|
-
base: BASE_UNITS.VOLUME,
|
|
2423
|
-
prefixes: PREFIXES.NONE,
|
|
2424
|
-
value: 0.0000036966911,
|
|
2425
|
-
offset: 0
|
|
2426
|
-
},
|
|
2427
|
-
// 3.696691 mL
|
|
2428
|
-
floz: {
|
|
2429
|
-
name: 'floz',
|
|
2430
|
-
base: BASE_UNITS.VOLUME,
|
|
2431
|
-
prefixes: PREFIXES.NONE,
|
|
2432
|
-
value: 0.00002957353,
|
|
2433
|
-
offset: 0
|
|
2434
|
-
},
|
|
2435
|
-
// 29.57353 mL
|
|
2436
|
-
gi: {
|
|
2437
|
-
name: 'gi',
|
|
2438
|
-
base: BASE_UNITS.VOLUME,
|
|
2439
|
-
prefixes: PREFIXES.NONE,
|
|
2440
|
-
value: 0.0001182941,
|
|
2441
|
-
offset: 0
|
|
2442
|
-
},
|
|
2443
|
-
// 118.2941 mL
|
|
2444
|
-
cp: {
|
|
2445
|
-
name: 'cp',
|
|
2446
|
-
base: BASE_UNITS.VOLUME,
|
|
2447
|
-
prefixes: PREFIXES.NONE,
|
|
2448
|
-
value: 0.0002365882,
|
|
2449
|
-
offset: 0
|
|
2450
|
-
},
|
|
2451
|
-
// 236.5882 mL
|
|
2452
|
-
pt: {
|
|
2453
|
-
name: 'pt',
|
|
2454
|
-
base: BASE_UNITS.VOLUME,
|
|
2455
|
-
prefixes: PREFIXES.NONE,
|
|
2456
|
-
value: 0.0004731765,
|
|
2457
|
-
offset: 0
|
|
2458
|
-
},
|
|
2459
|
-
// 473.1765 mL
|
|
2460
|
-
qt: {
|
|
2461
|
-
name: 'qt',
|
|
2462
|
-
base: BASE_UNITS.VOLUME,
|
|
2463
|
-
prefixes: PREFIXES.NONE,
|
|
2464
|
-
value: 0.0009463529,
|
|
2465
|
-
offset: 0
|
|
2466
|
-
},
|
|
2467
|
-
// 946.3529 mL
|
|
2468
|
-
gal: {
|
|
2469
|
-
name: 'gal',
|
|
2470
|
-
base: BASE_UNITS.VOLUME,
|
|
2471
|
-
prefixes: PREFIXES.NONE,
|
|
2472
|
-
value: 0.003785412,
|
|
2473
|
-
offset: 0
|
|
2474
|
-
},
|
|
2475
|
-
// 3.785412 L
|
|
2476
|
-
bbl: {
|
|
2477
|
-
name: 'bbl',
|
|
2478
|
-
base: BASE_UNITS.VOLUME,
|
|
2479
|
-
prefixes: PREFIXES.NONE,
|
|
2480
|
-
value: 0.1173478,
|
|
2481
|
-
offset: 0
|
|
2482
|
-
},
|
|
2483
|
-
// 117.3478 L
|
|
2484
|
-
obl: {
|
|
2485
|
-
name: 'obl',
|
|
2486
|
-
base: BASE_UNITS.VOLUME,
|
|
2487
|
-
prefixes: PREFIXES.NONE,
|
|
2488
|
-
value: 0.1589873,
|
|
2489
|
-
offset: 0
|
|
2490
|
-
},
|
|
2491
|
-
// 158.9873 L
|
|
2492
|
-
// {name: 'hogshead', base: BASE_UNITS.VOLUME, prefixes: PREFIXES.NONE, value: 0.2384810, offset: 0}, // 238.4810 L // TODO: hh?
|
|
2418
|
+
// 63 gallons
|
|
2493
2419
|
|
|
2494
2420
|
// Mass
|
|
2495
2421
|
g: {
|
|
@@ -3293,14 +3219,23 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3293
3219
|
teaspoons: 'teaspoon',
|
|
3294
3220
|
tablespoons: 'tablespoon',
|
|
3295
3221
|
minims: 'minim',
|
|
3222
|
+
fldr: 'fluiddram',
|
|
3296
3223
|
fluiddrams: 'fluiddram',
|
|
3224
|
+
floz: 'fluidounce',
|
|
3297
3225
|
fluidounces: 'fluidounce',
|
|
3226
|
+
gi: 'gill',
|
|
3298
3227
|
gills: 'gill',
|
|
3228
|
+
cp: 'cup',
|
|
3299
3229
|
cups: 'cup',
|
|
3230
|
+
pt: 'pint',
|
|
3300
3231
|
pints: 'pint',
|
|
3232
|
+
qt: 'quart',
|
|
3301
3233
|
quarts: 'quart',
|
|
3234
|
+
gal: 'gallon',
|
|
3302
3235
|
gallons: 'gallon',
|
|
3236
|
+
bbl: 'beerbarrel',
|
|
3303
3237
|
beerbarrels: 'beerbarrel',
|
|
3238
|
+
obl: 'oilbarrel',
|
|
3304
3239
|
oilbarrels: 'oilbarrel',
|
|
3305
3240
|
hogsheads: 'hogshead',
|
|
3306
3241
|
gtts: 'gtt',
|
|
@@ -3573,6 +3508,7 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3573
3508
|
|
|
3574
3509
|
/**
|
|
3575
3510
|
* Set a unit system for formatting derived units.
|
|
3511
|
+
* @memberof Unit
|
|
3576
3512
|
* @param {string} [name] The name of the unit system.
|
|
3577
3513
|
*/
|
|
3578
3514
|
Unit.setUnitSystem = function (name) {
|
|
@@ -3585,6 +3521,7 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3585
3521
|
|
|
3586
3522
|
/**
|
|
3587
3523
|
* Return the current unit system.
|
|
3524
|
+
* @memberof Unit
|
|
3588
3525
|
* @return {string} The current unit system.
|
|
3589
3526
|
*/
|
|
3590
3527
|
Unit.getUnitSystem = function () {
|
|
@@ -3674,7 +3611,9 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3674
3611
|
/**
|
|
3675
3612
|
* Checks if a character is a valid latin letter (upper or lower case).
|
|
3676
3613
|
* Note that this function can be overridden, for example to allow support of other alphabets.
|
|
3614
|
+
* @memberof Unit
|
|
3677
3615
|
* @param {string} c Tested character
|
|
3616
|
+
* @return {boolean} true if the character is a latin letter
|
|
3678
3617
|
*/
|
|
3679
3618
|
Unit.isValidAlpha = function isValidAlpha(c) {
|
|
3680
3619
|
return /^[a-zA-Z]$/.test(c);
|
|
@@ -3694,20 +3633,24 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3694
3633
|
/**
|
|
3695
3634
|
* Wrapper around createUnitSingle.
|
|
3696
3635
|
* Example:
|
|
3697
|
-
* createUnit({
|
|
3698
|
-
*
|
|
3699
|
-
*
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
*
|
|
3703
|
-
*
|
|
3704
|
-
*
|
|
3705
|
-
*
|
|
3706
|
-
*
|
|
3707
|
-
*
|
|
3708
|
-
*
|
|
3636
|
+
* createUnit( {
|
|
3637
|
+
* foo: {
|
|
3638
|
+
* prefixes: 'long',
|
|
3639
|
+
* baseName: 'essence-of-foo'
|
|
3640
|
+
* },
|
|
3641
|
+
* bar: '40 foo',
|
|
3642
|
+
* baz: {
|
|
3643
|
+
* definition: '1 bar/hour',
|
|
3644
|
+
* prefixes: 'long'
|
|
3645
|
+
* }
|
|
3646
|
+
* },
|
|
3647
|
+
* {
|
|
3648
|
+
* override: true
|
|
3649
|
+
* })
|
|
3650
|
+
* @memberof Unit
|
|
3709
3651
|
* @param {object} obj Object map. Each key becomes a unit which is defined by its value.
|
|
3710
3652
|
* @param {object} options
|
|
3653
|
+
* @return {Unit} the last created unit
|
|
3711
3654
|
*/
|
|
3712
3655
|
Unit.createUnit = function (obj, options) {
|
|
3713
3656
|
if (typeof obj !== 'object') {
|
|
@@ -3742,13 +3685,13 @@ const createUnitClass = exports.createUnitClass = /* #__PURE__ */(0, _factory.fa
|
|
|
3742
3685
|
* Create a user-defined unit and register it with the Unit type.
|
|
3743
3686
|
* Example:
|
|
3744
3687
|
* createUnitSingle('knot', '0.514444444 m/s')
|
|
3745
|
-
* createUnitSingle('acre', new Unit(43560, 'ft^2'))
|
|
3746
3688
|
*
|
|
3689
|
+
* @memberof Unit
|
|
3747
3690
|
* @param {string} name The name of the new unit. Must be unique. Example: 'knot'
|
|
3748
|
-
* @param {string
|
|
3691
|
+
* @param {string | Unit | object} definition Definition of the unit in terms
|
|
3749
3692
|
* of existing units. For example, '0.514444444 m / s'. Can be a Unit, a string,
|
|
3750
3693
|
* or an Object. If an Object, may have the following properties:
|
|
3751
|
-
* - definition {string|Unit} The definition of this unit.
|
|
3694
|
+
* - definition {string | Unit} The definition of this unit.
|
|
3752
3695
|
* - prefixes {string} "none", "short", "long", "binary_short", or "binary_long".
|
|
3753
3696
|
* The default is "none".
|
|
3754
3697
|
* - aliases {Array} Array of strings. Example: ['knots', 'kt', 'kts']
|
package/lib/cjs/utils/array.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.filterRegExp = filterRegExp;
|
|
|
16
16
|
exports.flatten = flatten;
|
|
17
17
|
exports.forEach = forEach;
|
|
18
18
|
exports.generalize = generalize;
|
|
19
|
+
exports.get = get;
|
|
19
20
|
exports.getArrayDataType = getArrayDataType;
|
|
20
21
|
exports.identify = identify;
|
|
21
22
|
exports.initial = initial;
|
|
@@ -813,6 +814,32 @@ function stretch(arrayToStretch, sizeToStretch, dimToStretch) {
|
|
|
813
814
|
return concat(...Array(sizeToStretch).fill(arrayToStretch), dimToStretch);
|
|
814
815
|
}
|
|
815
816
|
|
|
817
|
+
/**
|
|
818
|
+
* Retrieves a single element from an array given an index.
|
|
819
|
+
*
|
|
820
|
+
* @param {Array} array - The array from which to retrieve the value.
|
|
821
|
+
* @param {Array<number>} idx - An array of indices specifying the position of the desired element in each dimension.
|
|
822
|
+
* @returns {*} - The value at the specified position in the array.
|
|
823
|
+
*
|
|
824
|
+
* @example
|
|
825
|
+
* const arr = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]];
|
|
826
|
+
* const index = [1, 0, 1];
|
|
827
|
+
* console.log(getValue(arr, index)); // 6
|
|
828
|
+
*/
|
|
829
|
+
function get(array, index) {
|
|
830
|
+
if (!Array.isArray(array)) {
|
|
831
|
+
throw new Error('Array expected');
|
|
832
|
+
}
|
|
833
|
+
const size = arraySize(array);
|
|
834
|
+
if (index.length !== size.length) {
|
|
835
|
+
throw new _DimensionError.DimensionError(index.length, size.length);
|
|
836
|
+
}
|
|
837
|
+
for (let x = 0; x < index.length; x++) {
|
|
838
|
+
validateIndex(index[x], size[x]);
|
|
839
|
+
}
|
|
840
|
+
return index.reduce((acc, curr) => acc[curr], array);
|
|
841
|
+
}
|
|
842
|
+
|
|
816
843
|
/**
|
|
817
844
|
* Deep clones a multidimensional array
|
|
818
845
|
* @param {Array} array
|
|
@@ -87,7 +87,7 @@ function reduce(mat, dim, callback) {
|
|
|
87
87
|
throw new _IndexError.IndexError(dim, size.length);
|
|
88
88
|
}
|
|
89
89
|
if ((0, _is.isMatrix)(mat)) {
|
|
90
|
-
return mat.create(_reduce(mat.valueOf(), dim, callback));
|
|
90
|
+
return mat.create(_reduce(mat.valueOf(), dim, callback), mat.datatype());
|
|
91
91
|
} else {
|
|
92
92
|
return _reduce(mat, dim, callback);
|
|
93
93
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.maxArgumentCount = maxArgumentCount;
|
|
7
6
|
exports.memoize = memoize;
|
|
8
7
|
exports.memoizeCompare = memoizeCompare;
|
|
9
8
|
var _lruQueue = require("./lruQueue.js");
|
|
@@ -90,17 +89,4 @@ function memoizeCompare(fn, isEqual) {
|
|
|
90
89
|
};
|
|
91
90
|
memoize.cache = [];
|
|
92
91
|
return memoize;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Find the maximum number of arguments expected by a typed function.
|
|
97
|
-
* @param {function} fn A typed function
|
|
98
|
-
* @return {number} Returns the maximum number of expected arguments.
|
|
99
|
-
* Returns -1 when no signatures where found on the function.
|
|
100
|
-
*/
|
|
101
|
-
function maxArgumentCount(fn) {
|
|
102
|
-
return Object.keys(fn.signatures || {}).reduce(function (args, signature) {
|
|
103
|
-
const count = (signature.match(/,/g) || []).length + 1;
|
|
104
|
-
return Math.max(args, count);
|
|
105
|
-
}, -1);
|
|
106
92
|
}
|
package/lib/cjs/utils/is.js
CHANGED
|
@@ -25,14 +25,17 @@ exports.isFunctionNode = isFunctionNode;
|
|
|
25
25
|
exports.isHelp = isHelp;
|
|
26
26
|
exports.isIndex = isIndex;
|
|
27
27
|
exports.isIndexNode = isIndexNode;
|
|
28
|
+
exports.isMap = isMap;
|
|
28
29
|
exports.isMatrix = isMatrix;
|
|
29
30
|
exports.isNode = isNode;
|
|
30
31
|
exports.isNull = isNull;
|
|
31
32
|
exports.isNumber = isNumber;
|
|
32
33
|
exports.isObject = isObject;
|
|
33
34
|
exports.isObjectNode = isObjectNode;
|
|
35
|
+
exports.isObjectWrappingMap = isObjectWrappingMap;
|
|
34
36
|
exports.isOperatorNode = isOperatorNode;
|
|
35
37
|
exports.isParenthesisNode = isParenthesisNode;
|
|
38
|
+
exports.isPartitionedMap = isPartitionedMap;
|
|
36
39
|
exports.isRange = isRange;
|
|
37
40
|
exports.isRangeNode = isRangeNode;
|
|
38
41
|
exports.isRegExp = isRegExp;
|
|
@@ -45,6 +48,7 @@ exports.isUndefined = isUndefined;
|
|
|
45
48
|
exports.isUnit = isUnit;
|
|
46
49
|
exports.rule2Node = rule2Node;
|
|
47
50
|
exports.typeOf = typeOf;
|
|
51
|
+
var _map = require("./map.js");
|
|
48
52
|
// type checks for all known types
|
|
49
53
|
//
|
|
50
54
|
// note that:
|
|
@@ -135,6 +139,29 @@ function isRegExp(x) {
|
|
|
135
139
|
function isObject(x) {
|
|
136
140
|
return !!(x && typeof x === 'object' && x.constructor === Object && !isComplex(x) && !isFraction(x));
|
|
137
141
|
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns `true` if the passed object appears to be a Map (i.e. duck typing).
|
|
145
|
+
*
|
|
146
|
+
* Methods looked for are `get`, `set`, `keys` and `has`.
|
|
147
|
+
*
|
|
148
|
+
* @param {Map | object} object
|
|
149
|
+
* @returns
|
|
150
|
+
*/
|
|
151
|
+
function isMap(object) {
|
|
152
|
+
// We can use the fast instanceof, or a slower duck typing check.
|
|
153
|
+
// The duck typing method needs to cover enough methods to not be confused with DenseMatrix.
|
|
154
|
+
if (!object) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return object instanceof Map || object instanceof _map.ObjectWrappingMap || typeof object.set === 'function' && typeof object.get === 'function' && typeof object.keys === 'function' && typeof object.has === 'function';
|
|
158
|
+
}
|
|
159
|
+
function isPartitionedMap(object) {
|
|
160
|
+
return isMap(object) && isMap(object.a) && isMap(object.b);
|
|
161
|
+
}
|
|
162
|
+
function isObjectWrappingMap(object) {
|
|
163
|
+
return isMap(object) && isObject(object.wrappedObject);
|
|
164
|
+
}
|
|
138
165
|
function isNull(x) {
|
|
139
166
|
return x === null;
|
|
140
167
|
}
|
package/lib/cjs/utils/map.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.PartitionedMap = exports.ObjectWrappingMap = void 0;
|
|
|
7
7
|
exports.assign = assign;
|
|
8
8
|
exports.createEmptyMap = createEmptyMap;
|
|
9
9
|
exports.createMap = createMap;
|
|
10
|
-
exports.isMap = isMap;
|
|
11
10
|
exports.toObject = toObject;
|
|
12
11
|
var _customs = require("./customs.js");
|
|
13
12
|
var _is = require("./is.js");
|
|
@@ -157,7 +156,7 @@ function createMap(mapOrObject) {
|
|
|
157
156
|
if (!mapOrObject) {
|
|
158
157
|
return createEmptyMap();
|
|
159
158
|
}
|
|
160
|
-
if (isMap(mapOrObject)) {
|
|
159
|
+
if ((0, _is.isMap)(mapOrObject)) {
|
|
161
160
|
return mapOrObject;
|
|
162
161
|
}
|
|
163
162
|
if ((0, _is.isObject)(mapOrObject)) {
|
|
@@ -184,23 +183,6 @@ function toObject(map) {
|
|
|
184
183
|
return object;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
/**
|
|
188
|
-
* Returns `true` if the passed object appears to be a Map (i.e. duck typing).
|
|
189
|
-
*
|
|
190
|
-
* Methods looked for are `get`, `set`, `keys` and `has`.
|
|
191
|
-
*
|
|
192
|
-
* @param {Map | object} object
|
|
193
|
-
* @returns
|
|
194
|
-
*/
|
|
195
|
-
function isMap(object) {
|
|
196
|
-
// We can use the fast instanceof, or a slower duck typing check.
|
|
197
|
-
// The duck typing method needs to cover enough methods to not be confused with DenseMatrix.
|
|
198
|
-
if (!object) {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
return object instanceof Map || object instanceof ObjectWrappingMap || typeof object.set === 'function' && typeof object.get === 'function' && typeof object.keys === 'function' && typeof object.has === 'function';
|
|
202
|
-
}
|
|
203
|
-
|
|
204
186
|
/**
|
|
205
187
|
* Copies the contents of key-value pairs from each `objects` in to `map`.
|
|
206
188
|
*
|
|
@@ -216,7 +198,7 @@ function assign(map) {
|
|
|
216
198
|
if (!args) {
|
|
217
199
|
continue;
|
|
218
200
|
}
|
|
219
|
-
if (isMap(args)) {
|
|
201
|
+
if ((0, _is.isMap)(args)) {
|
|
220
202
|
for (const key of args.keys()) {
|
|
221
203
|
map.set(key, args.get(key));
|
|
222
204
|
}
|
package/lib/cjs/version.js
CHANGED
|
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = void 0;
|
|
7
|
-
const version = exports.version = '13.0
|
|
7
|
+
const version = exports.version = '13.1.0';
|
|
8
8
|
// Note: This file is automatically generated when building math.js.
|
|
9
9
|
// Changes made in this file will be overwritten.
|
package/lib/esm/core/create.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import typedFunction from 'typed-function';
|
|
3
|
-
import { deepFlatten, isLegacyFactory } from '../utils/object.js';
|
|
4
|
-
import * as emitter from './../utils/emitter.js';
|
|
5
|
-
import { importFactory } from './function/import.js';
|
|
6
|
-
import { configFactory } from './function/config.js';
|
|
7
|
-
import { factory, isFactory } from '../utils/factory.js';
|
|
8
|
-
import { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigNumber, isBlockNode, isBoolean, isChain, isCollection, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isOperatorNode, isParenthesisNode, isRange, isRangeNode, isRelationalNode, isRegExp, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit, isBigInt } from '../utils/is.js';
|
|
9
3
|
import { ArgumentsError } from '../error/ArgumentsError.js';
|
|
10
4
|
import { DimensionError } from '../error/DimensionError.js';
|
|
11
5
|
import { IndexError } from '../error/IndexError.js';
|
|
6
|
+
import { factory, isFactory } from '../utils/factory.js';
|
|
7
|
+
import { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigInt, isBigNumber, isBlockNode, isBoolean, isChain, isCollection, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMap, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isObjectWrappingMap, isOperatorNode, isParenthesisNode, isPartitionedMap, isRange, isRangeNode, isRegExp, isRelationalNode, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit } from '../utils/is.js';
|
|
8
|
+
import { deepFlatten, isLegacyFactory } from '../utils/object.js';
|
|
9
|
+
import * as emitter from './../utils/emitter.js';
|
|
12
10
|
import { DEFAULT_CONFIG } from './config.js';
|
|
11
|
+
import { configFactory } from './function/config.js';
|
|
12
|
+
import { importFactory } from './function/import.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Create a mathjs instance from given factory functions and optionally config
|
|
@@ -85,6 +85,9 @@ export function create(factories, config) {
|
|
|
85
85
|
isDate,
|
|
86
86
|
isRegExp,
|
|
87
87
|
isObject,
|
|
88
|
+
isMap,
|
|
89
|
+
isPartitionedMap,
|
|
90
|
+
isObjectWrappingMap,
|
|
88
91
|
isNull,
|
|
89
92
|
isUndefined,
|
|
90
93
|
isAccessorNode,
|
|
@@ -219,7 +219,7 @@ export function importFactory(typed, load, math, importedFactories) {
|
|
|
219
219
|
throw new Error('Factory name should not contain a nested path. ' + 'Name: ' + JSON.stringify(name));
|
|
220
220
|
}
|
|
221
221
|
var namespace = isTransformFunctionFactory(factory) ? math.expression.transform : math;
|
|
222
|
-
var existingTransform =
|
|
222
|
+
var existingTransform = name in math.expression.transform;
|
|
223
223
|
var existing = hasOwnProperty(namespace, name) ? namespace[name] : undefined;
|
|
224
224
|
var resolver = function resolver() {
|
|
225
225
|
// collect all dependencies, handle finding both functions and classes and other special cases
|
|
@@ -36,11 +36,10 @@
|
|
|
36
36
|
* @returns {function} The created typed-function.
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
import { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigNumber, isBlockNode, isBoolean, isChain, isCollection, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isOperatorNode, isParenthesisNode, isRange, isRangeNode, isRelationalNode, isRegExp, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit, isBigInt } from '../../utils/is.js';
|
|
40
39
|
import typedFunction from 'typed-function';
|
|
41
|
-
import { digits } from '../../utils/number.js';
|
|
42
40
|
import { factory } from '../../utils/factory.js';
|
|
43
|
-
import { isMap } from '../../utils/
|
|
41
|
+
import { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigInt, isBigNumber, isBlockNode, isBoolean, isChain, isCollection, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMap, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isOperatorNode, isParenthesisNode, isRange, isRangeNode, isRegExp, isRelationalNode, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit } from '../../utils/is.js';
|
|
42
|
+
import { digits } from '../../utils/number.js';
|
|
44
43
|
|
|
45
44
|
// returns a new instance of typed-function
|
|
46
45
|
var _createTyped2 = function _createTyped() {
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED
|
|
3
3
|
* DON'T MAKE CHANGES HERE
|
|
4
4
|
*/
|
|
5
|
-
import { matrixDependencies } from './dependenciesMatrix.generated.js';
|
|
6
5
|
import { typedDependencies } from './dependenciesTyped.generated.js';
|
|
7
6
|
import { createFlatten } from '../../factoriesAny.js';
|
|
8
7
|
export var flattenDependencies = {
|
|
9
|
-
matrixDependencies,
|
|
10
8
|
typedDependencies,
|
|
11
9
|
createFlatten
|
|
12
10
|
};
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED
|
|
3
3
|
* DON'T MAKE CHANGES HERE
|
|
4
4
|
*/
|
|
5
|
-
import { matrixDependencies } from './dependenciesMatrix.generated.js';
|
|
6
5
|
import { typedDependencies } from './dependenciesTyped.generated.js';
|
|
7
6
|
import { createSqueeze } from '../../factoriesAny.js';
|
|
8
7
|
export var squeezeDependencies = {
|
|
9
|
-
matrixDependencies,
|
|
10
8
|
typedDependencies,
|
|
11
9
|
createSqueeze
|
|
12
10
|
};
|
|
@@ -7,7 +7,7 @@ import { config } from './configReadonly.js';
|
|
|
7
7
|
import { createNode, createObjectNode, createOperatorNode, createParenthesisNode, createRelationalNode, createArrayNode, createBlockNode, createConditionalNode, createConstantNode, createRangeNode, createReviver, createChainClass, createFunctionAssignmentNode, createChain, createIndexNode, createAccessorNode, createAssignmentNode, createSymbolNode, createFunctionNode, createParse, createResolve, createSimplifyConstant, createCompile, createSimplifyCore, createEvaluate, createHelpClass, createParserClass, createSimplify, createSymbolicEqual, createLeafCount, createParser, createRationalize, createDerivative, createHelp, createFilterTransform, createForEachTransform, createMapTransform, createApplyTransform, createOrTransform, createAndTransform, createConcatTransform, createMaxTransform, createPrintTransform, createBitAndTransform, createDiffTransform, createMinTransform, createSubsetTransform, createBitOrTransform, createCumSumTransform, createIndexTransform, createSumTransform, createRangeTransform, createRowTransform, createColumnTransform, createMeanTransform, createQuantileSeqTransform, createVarianceTransform, createStdTransform } from '../factoriesAny.js';
|
|
8
8
|
import { BigNumber, Complex, e, _false, fineStructure, Fraction, i, _Infinity, LN10, LOG10E, Matrix, _NaN, _null, phi, Range, ResultSet, SQRT1_2,
|
|
9
9
|
// eslint-disable-line camelcase
|
|
10
|
-
sackurTetrode, tau, _true, version, DenseMatrix, efimovFactor, LN2, pi, replacer, SQRT2, typed, weakMixingAngle, abs, acos, acot, acsc, addScalar, arg, asech, asinh, atan, atanh, bigint, bitNot, boolean, clone, combinations, complex, conj, cos, cot, csc, cube, equalScalar, erf, exp, expm1, filter, forEach, format, getMatrixDataType, hex, im, isInteger, isNegative, isPositive, isZero, LOG2E, lgamma, log10, log2, map, multiplyScalar, not, number, oct, pickRandom, print, random, re, sec, sign, sin, SparseMatrix, splitUnit, square, string, subtractScalar, tan, typeOf, acosh, acsch, apply, asec, bignumber, combinationsWithRep, cosh, csch, isNaN, isPrime, randomInt, sech, sinh, sparse, sqrt, tanh, unaryMinus, acoth, bin, coth, fraction, isNumeric, matrix, matrixFromFunction, mode, numeric, prod, reshape, size,
|
|
10
|
+
sackurTetrode, tau, _true, version, DenseMatrix, efimovFactor, LN2, pi, replacer, SQRT2, typed, weakMixingAngle, abs, acos, acot, acsc, addScalar, arg, asech, asinh, atan, atanh, bigint, bitNot, boolean, clone, combinations, complex, conj, cos, cot, csc, cube, equalScalar, erf, exp, expm1, filter, flatten, forEach, format, getMatrixDataType, hex, im, isInteger, isNegative, isPositive, isZero, LOG2E, lgamma, log10, log2, map, multiplyScalar, not, number, oct, pickRandom, print, random, re, sec, sign, sin, SparseMatrix, splitUnit, square, string, subtractScalar, tan, typeOf, acosh, acsch, apply, asec, bignumber, combinationsWithRep, cosh, csch, isNaN, isPrime, randomInt, sech, sinh, sparse, sqrt, squeeze, tanh, unaryMinus, acoth, bin, coth, fraction, isNumeric, matrix, matrixFromFunction, mode, numeric, prod, reshape, size, transpose, xgcd, zeros, asin, cbrt, concat, count, ctranspose, diag, divideScalar, dotDivide, equal, hasNumericValue, identity, kron, largerEq, leftShift, lsolve, matrixFromColumns, nthRoot, ones, qr, resize, rightArithShift, round, smaller, subtract, to, unaryPlus, usolve, xor, add, atan2, bitAnd, bitOr, bitXor, catalan, compare, compareText, cumsum, deepEqual, diff, distance, dot, equalText, floor, gcd, hypot, ImmutableDenseMatrix, Index, larger, log, lsolveAll, matrixFromRows, min, mod, multiply, nthRoots, or, partitionSelect, rightLogShift, slu, subset, sum, trace, usolveAll, zpk2tf, ceil, compareNatural, composition, cross, det, dotMultiply, FibonacciHeap, fix, index, intersect, invmod, lcm, log1p, max, setCartesian, setDistinct, setIsSubset, setPowerset, smallerEq, sort, unequal, and, range, row, setDifference, setMultiplicity, setSymDifference, Spa, column, inv, lup, pinv, pow, setIntersect, setUnion, sqrtm, Unit, vacuumImpedance, wienDisplacement, atomicMass, bohrMagneton, boltzmann, conductanceQuantum, coulomb, deuteronMass, dotPow, electricConstant, elementaryCharge, expm, faraday, fft, gamma, gravitationConstant, hartreeEnergy, ifft, klitzing, loschmidt, magneticConstant, molarMass, molarPlanckConstant, neutronMass, nuclearMagneton, planckCharge, planckLength, planckTemperature, protonMass, quantumOfCirculation, reducedPlanckConstant, rydberg, secondRadiation, speedOfLight, stefanBoltzmann, thomsonCrossSection, avogadro, bohrRadius, createUnit, divide, electronMass, factorial, firstRadiation, gravity, inverseConductanceQuantum, lusolve, magneticFluxQuantum, molarMassC12, multinomial, permutations, planckMass, polynomialRoot, setSize, solveODE, stirlingS2, unit, bellNumbers, eigs, fermiCoupling, gasConstant, kldivergence, mean, molarVolume, planckConstant, quantileSeq, variance, classicalElectronRadius, median, corr, freqz, mad, std, zeta, norm, rotationMatrix, planckTime, schur, rotate, sylvester, lyap } from './pureFunctionsAny.generated.js';
|
|
11
11
|
var math = {}; // NOT pure!
|
|
12
12
|
var mathWithTransform = {}; // NOT pure!
|
|
13
13
|
var classes = {}; // NOT pure!
|
|
@@ -300,6 +300,7 @@ _extends(math, {
|
|
|
300
300
|
exp,
|
|
301
301
|
expm1,
|
|
302
302
|
filter,
|
|
303
|
+
flatten,
|
|
303
304
|
forEach,
|
|
304
305
|
format,
|
|
305
306
|
getMatrixDataType,
|
|
@@ -347,6 +348,7 @@ _extends(math, {
|
|
|
347
348
|
sinh,
|
|
348
349
|
sparse,
|
|
349
350
|
sqrt,
|
|
351
|
+
squeeze,
|
|
350
352
|
tanh,
|
|
351
353
|
unaryMinus,
|
|
352
354
|
acoth,
|
|
@@ -361,7 +363,6 @@ _extends(math, {
|
|
|
361
363
|
prod,
|
|
362
364
|
reshape,
|
|
363
365
|
size,
|
|
364
|
-
squeeze,
|
|
365
366
|
transpose,
|
|
366
367
|
xgcd,
|
|
367
368
|
zeros,
|
|
@@ -374,7 +375,6 @@ _extends(math, {
|
|
|
374
375
|
divideScalar,
|
|
375
376
|
dotDivide,
|
|
376
377
|
equal,
|
|
377
|
-
flatten,
|
|
378
378
|
hasNumericValue,
|
|
379
379
|
identity,
|
|
380
380
|
kron,
|