feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

72
node_modules/mathjs/lib/cjs/function/bitwise/bitAnd.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBitAnd = void 0;
var _bitwise = require("../../utils/bignumber/bitwise.js");
var _matAlgo02xDS = require("../../type/matrix/utils/matAlgo02xDS0.js");
var _matAlgo11xS0s = require("../../type/matrix/utils/matAlgo11xS0s.js");
var _matAlgo06xS0S = require("../../type/matrix/utils/matAlgo06xS0S0.js");
var _factory = require("../../utils/factory.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _index = require("../../plain/number/index.js");
const name = 'bitAnd';
const dependencies = ['typed', 'matrix', 'equalScalar', 'concat'];
const createBitAnd = exports.createBitAnd = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
equalScalar,
concat
} = _ref;
const matAlgo02xDS0 = (0, _matAlgo02xDS.createMatAlgo02xDS0)({
typed,
equalScalar
});
const matAlgo06xS0S0 = (0, _matAlgo06xS0S.createMatAlgo06xS0S0)({
typed,
equalScalar
});
const matAlgo11xS0s = (0, _matAlgo11xS0s.createMatAlgo11xS0s)({
typed,
equalScalar
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
/**
* Bitwise AND two values, `x & y`.
* For matrices, the function is evaluated element wise.
*
* Syntax:
*
* math.bitAnd(x, y)
*
* Examples:
*
* math.bitAnd(53, 131) // returns number 1
*
* math.bitAnd([1, 12, 31], 42) // returns Array [0, 8, 10]
*
* See also:
*
* bitNot, bitOr, bitXor, leftShift, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x First value to and
* @param {number | BigNumber | bigint | Array | Matrix} y Second value to and
* @return {number | BigNumber | bigint | Array | Matrix} AND of `x` and `y`
*/
return typed(name, {
'number, number': _index.bitAndNumber,
'BigNumber, BigNumber': _bitwise.bitAndBigNumber,
'bigint, bigint': (x, y) => x & y
}, matrixAlgorithmSuite({
SS: matAlgo06xS0S0,
DS: matAlgo02xDS0,
Ss: matAlgo11xS0s
}));
});

45
node_modules/mathjs/lib/cjs/function/bitwise/bitNot.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBitNot = void 0;
var _bitwise = require("../../utils/bignumber/bitwise.js");
var _collection = require("../../utils/collection.js");
var _factory = require("../../utils/factory.js");
var _index = require("../../plain/number/index.js");
const name = 'bitNot';
const dependencies = ['typed'];
const createBitNot = exports.createBitNot = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed
} = _ref;
/**
* Bitwise NOT value, `~x`.
* For matrices, the function is evaluated element wise.
* For units, the function is evaluated on the best prefix base.
*
* Syntax:
*
* math.bitNot(x)
*
* Examples:
*
* math.bitNot(1) // returns number -2
*
* math.bitNot([2, -3, 4]) // returns Array [-3, 2, -5]
*
* See also:
*
* bitAnd, bitOr, bitXor, leftShift, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x Value to not
* @return {number | BigNumber | bigint | Array | Matrix} NOT of `x`
*/
return typed(name, {
number: _index.bitNotNumber,
BigNumber: _bitwise.bitNotBigNumber,
bigint: x => ~x,
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
});
});

73
node_modules/mathjs/lib/cjs/function/bitwise/bitOr.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBitOr = void 0;
var _bitwise = require("../../utils/bignumber/bitwise.js");
var _factory = require("../../utils/factory.js");
var _matAlgo10xSids = require("../../type/matrix/utils/matAlgo10xSids.js");
var _matAlgo04xSidSid = require("../../type/matrix/utils/matAlgo04xSidSid.js");
var _matAlgo01xDSid = require("../../type/matrix/utils/matAlgo01xDSid.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _index = require("../../plain/number/index.js");
const name = 'bitOr';
const dependencies = ['typed', 'matrix', 'equalScalar', 'DenseMatrix', 'concat'];
const createBitOr = exports.createBitOr = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
equalScalar,
DenseMatrix,
concat
} = _ref;
const matAlgo01xDSid = (0, _matAlgo01xDSid.createMatAlgo01xDSid)({
typed
});
const matAlgo04xSidSid = (0, _matAlgo04xSidSid.createMatAlgo04xSidSid)({
typed,
equalScalar
});
const matAlgo10xSids = (0, _matAlgo10xSids.createMatAlgo10xSids)({
typed,
DenseMatrix
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
/**
* Bitwise OR two values, `x | y`.
* For matrices, the function is evaluated element wise.
* For units, the function is evaluated on the lowest print base.
*
* Syntax:
*
* math.bitOr(x, y)
*
* Examples:
*
* math.bitOr(1, 2) // returns number 3
*
* math.bitOr([1, 2, 3], 4) // returns Array [5, 6, 7]
*
* See also:
*
* bitAnd, bitNot, bitXor, leftShift, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x First value to or
* @param {number | BigNumber | bigint | Array | Matrix} y Second value to or
* @return {number | BigNumber | bigint | Array | Matrix} OR of `x` and `y`
*/
return typed(name, {
'number, number': _index.bitOrNumber,
'BigNumber, BigNumber': _bitwise.bitOrBigNumber,
'bigint, bigint': (x, y) => x | y
}, matrixAlgorithmSuite({
SS: matAlgo04xSidSid,
DS: matAlgo01xDSid,
Ss: matAlgo10xSids
}));
});

71
node_modules/mathjs/lib/cjs/function/bitwise/bitXor.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBitXor = void 0;
var _bitwise = require("../../utils/bignumber/bitwise.js");
var _matAlgo03xDSf = require("../../type/matrix/utils/matAlgo03xDSf.js");
var _matAlgo07xSSf = require("../../type/matrix/utils/matAlgo07xSSf.js");
var _matAlgo12xSfs = require("../../type/matrix/utils/matAlgo12xSfs.js");
var _factory = require("../../utils/factory.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _index = require("../../plain/number/index.js");
const name = 'bitXor';
const dependencies = ['typed', 'matrix', 'DenseMatrix', 'concat'];
const createBitXor = exports.createBitXor = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
DenseMatrix,
concat
} = _ref;
const matAlgo03xDSf = (0, _matAlgo03xDSf.createMatAlgo03xDSf)({
typed
});
const matAlgo07xSSf = (0, _matAlgo07xSSf.createMatAlgo07xSSf)({
typed,
DenseMatrix
});
const matAlgo12xSfs = (0, _matAlgo12xSfs.createMatAlgo12xSfs)({
typed,
DenseMatrix
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
/**
* Bitwise XOR two values, `x ^ y`.
* For matrices, the function is evaluated element wise.
*
* Syntax:
*
* math.bitXor(x, y)
*
* Examples:
*
* math.bitXor(1, 2) // returns number 3
*
* math.bitXor([2, 3, 4], 4) // returns Array [6, 7, 0]
*
* See also:
*
* bitAnd, bitNot, bitOr, leftShift, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x First value to xor
* @param {number | BigNumber | bigint | Array | Matrix} y Second value to xor
* @return {number | BigNumber | bigint | Array | Matrix} XOR of `x` and `y`
*/
return typed(name, {
'number, number': _index.bitXorNumber,
'BigNumber, BigNumber': _bitwise.bitXor,
'bigint, bigint': (x, y) => x ^ y
}, matrixAlgorithmSuite({
SS: matAlgo07xSSf,
DS: matAlgo03xDSf,
Ss: matAlgo12xSfs
}));
});

View File

@@ -0,0 +1,121 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createLeftShift = void 0;
var _matAlgo02xDS = require("../../type/matrix/utils/matAlgo02xDS0.js");
var _matAlgo11xS0s = require("../../type/matrix/utils/matAlgo11xS0s.js");
var _matAlgo14xDs = require("../../type/matrix/utils/matAlgo14xDs.js");
var _matAlgo01xDSid = require("../../type/matrix/utils/matAlgo01xDSid.js");
var _matAlgo10xSids = require("../../type/matrix/utils/matAlgo10xSids.js");
var _matAlgo08xS0Sid = require("../../type/matrix/utils/matAlgo08xS0Sid.js");
var _factory = require("../../utils/factory.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _useMatrixForArrayScalar = require("./useMatrixForArrayScalar.js");
var _index = require("../../plain/number/index.js");
var _bitwise = require("../../utils/bignumber/bitwise.js");
const name = 'leftShift';
const dependencies = ['typed', 'matrix', 'equalScalar', 'zeros', 'DenseMatrix', 'concat'];
const createLeftShift = exports.createLeftShift = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
equalScalar,
zeros,
DenseMatrix,
concat
} = _ref;
const matAlgo01xDSid = (0, _matAlgo01xDSid.createMatAlgo01xDSid)({
typed
});
const matAlgo02xDS0 = (0, _matAlgo02xDS.createMatAlgo02xDS0)({
typed,
equalScalar
});
const matAlgo08xS0Sid = (0, _matAlgo08xS0Sid.createMatAlgo08xS0Sid)({
typed,
equalScalar
});
const matAlgo10xSids = (0, _matAlgo10xSids.createMatAlgo10xSids)({
typed,
DenseMatrix
});
const matAlgo11xS0s = (0, _matAlgo11xS0s.createMatAlgo11xS0s)({
typed,
equalScalar
});
const matAlgo14xDs = (0, _matAlgo14xDs.createMatAlgo14xDs)({
typed
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
const useMatrixForArrayScalar = (0, _useMatrixForArrayScalar.createUseMatrixForArrayScalar)({
typed,
matrix
});
/**
* Bitwise left logical shift of a value x by y number of bits, `x << y`.
* For matrices, the function is evaluated element wise.
* For units, the function is evaluated on the best prefix base.
*
* Syntax:
*
* math.leftShift(x, y)
*
* Examples:
*
* math.leftShift(1, 2) // returns number 4
*
* math.leftShift([1, 2, 4], 4) // returns Array [16, 32, 64]
*
* See also:
*
* leftShift, bitNot, bitOr, bitXor, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x Value to be shifted
* @param {number | BigNumber | bigint} y Amount of shifts
* @return {number | BigNumber | bigint | Array | Matrix} `x` shifted left `y` times
*/
return typed(name, {
'number, number': _index.leftShiftNumber,
'BigNumber, BigNumber': _bitwise.leftShiftBigNumber,
'bigint, bigint': (x, y) => x << y,
'SparseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo11xS0s(x, y, self, false);
}),
'DenseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo14xDs(x, y, self, false);
}),
'number | BigNumber, SparseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo10xSids(y, x, self, true);
}),
'number | BigNumber, DenseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo14xDs(y, x, self, true);
})
}, useMatrixForArrayScalar, matrixAlgorithmSuite({
SS: matAlgo08xS0Sid,
DS: matAlgo01xDSid,
SD: matAlgo02xDS0
}));
});

View File

@@ -0,0 +1,121 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createRightArithShift = void 0;
var _bitwise = require("../../utils/bignumber/bitwise.js");
var _matAlgo02xDS = require("../../type/matrix/utils/matAlgo02xDS0.js");
var _matAlgo11xS0s = require("../../type/matrix/utils/matAlgo11xS0s.js");
var _matAlgo14xDs = require("../../type/matrix/utils/matAlgo14xDs.js");
var _matAlgo01xDSid = require("../../type/matrix/utils/matAlgo01xDSid.js");
var _matAlgo10xSids = require("../../type/matrix/utils/matAlgo10xSids.js");
var _matAlgo08xS0Sid = require("../../type/matrix/utils/matAlgo08xS0Sid.js");
var _factory = require("../../utils/factory.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _useMatrixForArrayScalar = require("./useMatrixForArrayScalar.js");
var _index = require("../../plain/number/index.js");
const name = 'rightArithShift';
const dependencies = ['typed', 'matrix', 'equalScalar', 'zeros', 'DenseMatrix', 'concat'];
const createRightArithShift = exports.createRightArithShift = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
equalScalar,
zeros,
DenseMatrix,
concat
} = _ref;
const matAlgo01xDSid = (0, _matAlgo01xDSid.createMatAlgo01xDSid)({
typed
});
const matAlgo02xDS0 = (0, _matAlgo02xDS.createMatAlgo02xDS0)({
typed,
equalScalar
});
const matAlgo08xS0Sid = (0, _matAlgo08xS0Sid.createMatAlgo08xS0Sid)({
typed,
equalScalar
});
const matAlgo10xSids = (0, _matAlgo10xSids.createMatAlgo10xSids)({
typed,
DenseMatrix
});
const matAlgo11xS0s = (0, _matAlgo11xS0s.createMatAlgo11xS0s)({
typed,
equalScalar
});
const matAlgo14xDs = (0, _matAlgo14xDs.createMatAlgo14xDs)({
typed
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
const useMatrixForArrayScalar = (0, _useMatrixForArrayScalar.createUseMatrixForArrayScalar)({
typed,
matrix
});
/**
* Bitwise right arithmetic shift of a value x by y number of bits, `x >> y`.
* For matrices, the function is evaluated element wise.
* For units, the function is evaluated on the best prefix base.
*
* Syntax:
*
* math.rightArithShift(x, y)
*
* Examples:
*
* math.rightArithShift(4, 2) // returns number 1
*
* math.rightArithShift([16, -32, 64], 4) // returns Array [1, -2, 4]
*
* See also:
*
* bitAnd, bitNot, bitOr, bitXor, rightArithShift, rightLogShift
*
* @param {number | BigNumber | bigint | Array | Matrix} x Value to be shifted
* @param {number | BigNumber | bigint} y Amount of shifts
* @return {number | BigNumber | bigint | Array | Matrix} `x` zero-filled shifted right `y` times
*/
return typed(name, {
'number, number': _index.rightArithShiftNumber,
'BigNumber, BigNumber': _bitwise.rightArithShiftBigNumber,
'bigint, bigint': (x, y) => x >> y,
'SparseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo11xS0s(x, y, self, false);
}),
'DenseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo14xDs(x, y, self, false);
}),
'number | BigNumber, SparseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo10xSids(y, x, self, true);
}),
'number | BigNumber, DenseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo14xDs(y, x, self, true);
})
}, useMatrixForArrayScalar, matrixAlgorithmSuite({
SS: matAlgo08xS0Sid,
DS: matAlgo01xDSid,
SD: matAlgo02xDS0
}));
});

View File

@@ -0,0 +1,121 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createRightLogShift = void 0;
var _matAlgo02xDS = require("../../type/matrix/utils/matAlgo02xDS0.js");
var _matAlgo11xS0s = require("../../type/matrix/utils/matAlgo11xS0s.js");
var _matAlgo14xDs = require("../../type/matrix/utils/matAlgo14xDs.js");
var _matAlgo01xDSid = require("../../type/matrix/utils/matAlgo01xDSid.js");
var _matAlgo10xSids = require("../../type/matrix/utils/matAlgo10xSids.js");
var _matAlgo08xS0Sid = require("../../type/matrix/utils/matAlgo08xS0Sid.js");
var _factory = require("../../utils/factory.js");
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
var _index = require("../../plain/number/index.js");
var _useMatrixForArrayScalar = require("./useMatrixForArrayScalar.js");
const name = 'rightLogShift';
const dependencies = ['typed', 'matrix', 'equalScalar', 'zeros', 'DenseMatrix', 'concat'];
const createRightLogShift = exports.createRightLogShift = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
let {
typed,
matrix,
equalScalar,
zeros,
DenseMatrix,
concat
} = _ref;
const matAlgo01xDSid = (0, _matAlgo01xDSid.createMatAlgo01xDSid)({
typed
});
const matAlgo02xDS0 = (0, _matAlgo02xDS.createMatAlgo02xDS0)({
typed,
equalScalar
});
const matAlgo08xS0Sid = (0, _matAlgo08xS0Sid.createMatAlgo08xS0Sid)({
typed,
equalScalar
});
const matAlgo10xSids = (0, _matAlgo10xSids.createMatAlgo10xSids)({
typed,
DenseMatrix
});
const matAlgo11xS0s = (0, _matAlgo11xS0s.createMatAlgo11xS0s)({
typed,
equalScalar
});
const matAlgo14xDs = (0, _matAlgo14xDs.createMatAlgo14xDs)({
typed
});
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
typed,
matrix,
concat
});
const useMatrixForArrayScalar = (0, _useMatrixForArrayScalar.createUseMatrixForArrayScalar)({
typed,
matrix
});
/**
* Bitwise right logical shift of value x by y number of bits, `x >>> y`.
* For matrices, the function is evaluated element wise.
* For units, the function is evaluated on the best prefix base.
*
* Syntax:
*
* math.rightLogShift(x, y)
*
* Examples:
*
* math.rightLogShift(4, 2) // returns number 1
*
* math.rightLogShift([16, 32, 64], 4) // returns Array [1, 2, 4]
*
* See also:
*
* bitAnd, bitNot, bitOr, bitXor, leftShift, rightLogShift
*
* @param {number | Array | Matrix} x Value to be shifted
* @param {number} y Amount of shifts
* @return {number | Array | Matrix} `x` zero-filled shifted right `y` times
*/
return typed(name, {
'number, number': _index.rightLogShiftNumber,
// 'BigNumber, BigNumber': ..., // TODO: implement BigNumber support for rightLogShift
'SparseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo11xS0s(x, y, self, false);
}),
'DenseMatrix, number | BigNumber': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(y, 0)) {
return x.clone();
}
return matAlgo14xDs(x, y, self, false);
}),
'number | BigNumber, SparseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo10xSids(y, x, self, true);
}),
'number | BigNumber, DenseMatrix': typed.referToSelf(self => (x, y) => {
// check scalar
if (equalScalar(x, 0)) {
return zeros(y.size(), y.storage());
}
return matAlgo14xDs(y, x, self, true);
})
}, useMatrixForArrayScalar, matrixAlgorithmSuite({
SS: matAlgo08xS0Sid,
DS: matAlgo01xDSid,
SD: matAlgo02xDS0
}));
});

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createUseMatrixForArrayScalar = void 0;
var _factory = require("../../utils/factory.js");
const createUseMatrixForArrayScalar = exports.createUseMatrixForArrayScalar = /* #__PURE__ */(0, _factory.factory)('useMatrixForArrayScalar', ['typed', 'matrix'], _ref => {
let {
typed,
matrix
} = _ref;
return {
'Array, number': typed.referTo('DenseMatrix, number', selfDn => (x, y) => selfDn(matrix(x), y).valueOf()),
'Array, BigNumber': typed.referTo('DenseMatrix, BigNumber', selfDB => (x, y) => selfDB(matrix(x), y).valueOf()),
'number, Array': typed.referTo('number, DenseMatrix', selfnD => (x, y) => selfnD(x, matrix(y)).valueOf()),
'BigNumber, Array': typed.referTo('BigNumber, DenseMatrix', selfBD => (x, y) => selfBD(x, matrix(y)).valueOf())
};
});