feat:node-modules
This commit is contained in:
128
node_modules/mathjs/lib/cjs/function/logical/and.js
generated
vendored
Normal file
128
node_modules/mathjs/lib/cjs/function/logical/and.js
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createAnd = 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 _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 = 'and';
|
||||
const dependencies = ['typed', 'matrix', 'equalScalar', 'zeros', 'not', 'concat'];
|
||||
const createAnd = exports.createAnd = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed,
|
||||
matrix,
|
||||
equalScalar,
|
||||
zeros,
|
||||
not,
|
||||
concat
|
||||
} = _ref;
|
||||
const matAlgo02xDS0 = (0, _matAlgo02xDS.createMatAlgo02xDS0)({
|
||||
typed,
|
||||
equalScalar
|
||||
});
|
||||
const matAlgo06xS0S0 = (0, _matAlgo06xS0S.createMatAlgo06xS0S0)({
|
||||
typed,
|
||||
equalScalar
|
||||
});
|
||||
const matAlgo11xS0s = (0, _matAlgo11xS0s.createMatAlgo11xS0s)({
|
||||
typed,
|
||||
equalScalar
|
||||
});
|
||||
const matAlgo14xDs = (0, _matAlgo14xDs.createMatAlgo14xDs)({
|
||||
typed
|
||||
});
|
||||
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
|
||||
typed,
|
||||
matrix,
|
||||
concat
|
||||
});
|
||||
|
||||
/**
|
||||
* Logical `and`. Test whether two values are both defined with a nonzero/nonempty value.
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.and(x, y)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* math.and(2, 4) // returns true
|
||||
*
|
||||
* a = [2, 0, 0]
|
||||
* b = [3, 7, 0]
|
||||
* c = 0
|
||||
*
|
||||
* math.and(a, b) // returns [true, false, false]
|
||||
* math.and(a, c) // returns [false, false, false]
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* not, or, xor
|
||||
*
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} x First value to check
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} y Second value to check
|
||||
* @return {boolean | Array | Matrix}
|
||||
* Returns true when both inputs are defined with a nonzero/nonempty value.
|
||||
*/
|
||||
return typed(name, {
|
||||
'number, number': _index.andNumber,
|
||||
'Complex, Complex': function (x, y) {
|
||||
return (x.re !== 0 || x.im !== 0) && (y.re !== 0 || y.im !== 0);
|
||||
},
|
||||
'BigNumber, BigNumber': function (x, y) {
|
||||
return !x.isZero() && !y.isZero() && !x.isNaN() && !y.isNaN();
|
||||
},
|
||||
'bigint, bigint': _index.andNumber,
|
||||
'Unit, Unit': typed.referToSelf(self => (x, y) => self(x.value || 0, y.value || 0)),
|
||||
'SparseMatrix, any': typed.referToSelf(self => (x, y) => {
|
||||
// check scalar
|
||||
if (not(y)) {
|
||||
// return zero matrix
|
||||
return zeros(x.size(), x.storage());
|
||||
}
|
||||
return matAlgo11xS0s(x, y, self, false);
|
||||
}),
|
||||
'DenseMatrix, any': typed.referToSelf(self => (x, y) => {
|
||||
// check scalar
|
||||
if (not(y)) {
|
||||
// return zero matrix
|
||||
return zeros(x.size(), x.storage());
|
||||
}
|
||||
return matAlgo14xDs(x, y, self, false);
|
||||
}),
|
||||
'any, SparseMatrix': typed.referToSelf(self => (x, y) => {
|
||||
// check scalar
|
||||
if (not(x)) {
|
||||
// return zero matrix
|
||||
return zeros(x.size(), x.storage());
|
||||
}
|
||||
return matAlgo11xS0s(y, x, self, true);
|
||||
}),
|
||||
'any, DenseMatrix': typed.referToSelf(self => (x, y) => {
|
||||
// check scalar
|
||||
if (not(x)) {
|
||||
// return zero matrix
|
||||
return zeros(x.size(), x.storage());
|
||||
}
|
||||
return matAlgo14xDs(y, x, self, true);
|
||||
}),
|
||||
'Array, any': typed.referToSelf(self => (x, y) => {
|
||||
// use matrix implementation
|
||||
return self(matrix(x), y).valueOf();
|
||||
}),
|
||||
'any, Array': typed.referToSelf(self => (x, y) => {
|
||||
// use matrix implementation
|
||||
return self(x, matrix(y)).valueOf();
|
||||
})
|
||||
}, matrixAlgorithmSuite({
|
||||
SS: matAlgo06xS0S0,
|
||||
DS: matAlgo02xDS0
|
||||
}));
|
||||
});
|
||||
54
node_modules/mathjs/lib/cjs/function/logical/not.js
generated
vendored
Normal file
54
node_modules/mathjs/lib/cjs/function/logical/not.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createNot = void 0;
|
||||
var _collection = require("../../utils/collection.js");
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _index = require("../../plain/number/index.js");
|
||||
const name = 'not';
|
||||
const dependencies = ['typed'];
|
||||
const createNot = exports.createNot = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed
|
||||
} = _ref;
|
||||
/**
|
||||
* Logical `not`. Flips boolean value of a given parameter.
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.not(x)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* math.not(2) // returns false
|
||||
* math.not(0) // returns true
|
||||
* math.not(true) // returns false
|
||||
*
|
||||
* a = [2, -7, 0]
|
||||
* math.not(a) // returns [false, false, true]
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* and, or, xor
|
||||
*
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} x First value to check
|
||||
* @return {boolean | Array | Matrix}
|
||||
* Returns true when input is a zero or empty value.
|
||||
*/
|
||||
return typed(name, {
|
||||
'null | undefined': () => true,
|
||||
number: _index.notNumber,
|
||||
Complex: function (x) {
|
||||
return x.re === 0 && x.im === 0;
|
||||
},
|
||||
BigNumber: function (x) {
|
||||
return x.isZero() || x.isNaN();
|
||||
},
|
||||
bigint: x => !x,
|
||||
Unit: typed.referToSelf(self => x => typed.find(self, x.valueType())(x.value)),
|
||||
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
|
||||
});
|
||||
});
|
||||
83
node_modules/mathjs/lib/cjs/function/logical/or.js
generated
vendored
Normal file
83
node_modules/mathjs/lib/cjs/function/logical/or.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createOr = void 0;
|
||||
var _matAlgo03xDSf = require("../../type/matrix/utils/matAlgo03xDSf.js");
|
||||
var _matAlgo12xSfs = require("../../type/matrix/utils/matAlgo12xSfs.js");
|
||||
var _matAlgo05xSfSf = require("../../type/matrix/utils/matAlgo05xSfSf.js");
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _matrixAlgorithmSuite = require("../../type/matrix/utils/matrixAlgorithmSuite.js");
|
||||
var _index = require("../../plain/number/index.js");
|
||||
const name = 'or';
|
||||
const dependencies = ['typed', 'matrix', 'equalScalar', 'DenseMatrix', 'concat'];
|
||||
const createOr = exports.createOr = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed,
|
||||
matrix,
|
||||
equalScalar,
|
||||
DenseMatrix,
|
||||
concat
|
||||
} = _ref;
|
||||
const matAlgo03xDSf = (0, _matAlgo03xDSf.createMatAlgo03xDSf)({
|
||||
typed
|
||||
});
|
||||
const matAlgo05xSfSf = (0, _matAlgo05xSfSf.createMatAlgo05xSfSf)({
|
||||
typed,
|
||||
equalScalar
|
||||
});
|
||||
const matAlgo12xSfs = (0, _matAlgo12xSfs.createMatAlgo12xSfs)({
|
||||
typed,
|
||||
DenseMatrix
|
||||
});
|
||||
const matrixAlgorithmSuite = (0, _matrixAlgorithmSuite.createMatrixAlgorithmSuite)({
|
||||
typed,
|
||||
matrix,
|
||||
concat
|
||||
});
|
||||
|
||||
/**
|
||||
* Logical `or`. Test if at least one value is defined with a nonzero/nonempty value.
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.or(x, y)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* math.or(2, 4) // returns true
|
||||
*
|
||||
* a = [2, 5, 0]
|
||||
* b = [0, 22, 0]
|
||||
* c = 0
|
||||
*
|
||||
* math.or(a, b) // returns [true, true, false]
|
||||
* math.or(b, c) // returns [false, true, false]
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* and, not, xor
|
||||
*
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} x First value to check
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} y Second value to check
|
||||
* @return {boolean | Array | Matrix}
|
||||
* Returns true when one of the inputs is defined with a nonzero/nonempty value.
|
||||
*/
|
||||
return typed(name, {
|
||||
'number, number': _index.orNumber,
|
||||
'Complex, Complex': function (x, y) {
|
||||
return x.re !== 0 || x.im !== 0 || y.re !== 0 || y.im !== 0;
|
||||
},
|
||||
'BigNumber, BigNumber': function (x, y) {
|
||||
return !x.isZero() && !x.isNaN() || !y.isZero() && !y.isNaN();
|
||||
},
|
||||
'bigint, bigint': _index.orNumber,
|
||||
'Unit, Unit': typed.referToSelf(self => (x, y) => self(x.value || 0, y.value || 0))
|
||||
}, matrixAlgorithmSuite({
|
||||
SS: matAlgo05xSfSf,
|
||||
DS: matAlgo03xDSf,
|
||||
Ss: matAlgo12xSfs
|
||||
}));
|
||||
});
|
||||
82
node_modules/mathjs/lib/cjs/function/logical/xor.js
generated
vendored
Normal file
82
node_modules/mathjs/lib/cjs/function/logical/xor.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createXor = void 0;
|
||||
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 = 'xor';
|
||||
const dependencies = ['typed', 'matrix', 'DenseMatrix', 'concat'];
|
||||
const createXor = exports.createXor = /* #__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
|
||||
});
|
||||
|
||||
/**
|
||||
* Logical `xor`. Test whether one and only one value is defined with a nonzero/nonempty value.
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.xor(x, y)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* math.xor(2, 4) // returns false
|
||||
*
|
||||
* a = [2, 0, 0]
|
||||
* b = [2, 7, 0]
|
||||
* c = 0
|
||||
*
|
||||
* math.xor(a, b) // returns [false, true, false]
|
||||
* math.xor(a, c) // returns [true, false, false]
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* and, not, or
|
||||
*
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} x First value to check
|
||||
* @param {number | BigNumber | bigint | Complex | Unit | Array | Matrix} y Second value to check
|
||||
* @return {boolean | Array | Matrix}
|
||||
* Returns true when one and only one input is defined with a nonzero/nonempty value.
|
||||
*/
|
||||
return typed(name, {
|
||||
'number, number': _index.xorNumber,
|
||||
'Complex, Complex': function (x, y) {
|
||||
return (x.re !== 0 || x.im !== 0) !== (y.re !== 0 || y.im !== 0);
|
||||
},
|
||||
'bigint, bigint': _index.xorNumber,
|
||||
'BigNumber, BigNumber': function (x, y) {
|
||||
return (!x.isZero() && !x.isNaN()) !== (!y.isZero() && !y.isNaN());
|
||||
},
|
||||
'Unit, Unit': typed.referToSelf(self => (x, y) => self(x.value || 0, y.value || 0))
|
||||
}, matrixAlgorithmSuite({
|
||||
SS: matAlgo07xSSf,
|
||||
DS: matAlgo03xDSf,
|
||||
Ss: matAlgo12xSfs
|
||||
}));
|
||||
});
|
||||
Reference in New Issue
Block a user