feat:node-modules
This commit is contained in:
38
node_modules/mathjs/lib/cjs/function/algebra/simplify/wildcards.js
generated
vendored
Normal file
38
node_modules/mathjs/lib/cjs/function/algebra/simplify/wildcards.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isConstantExpression = isConstantExpression;
|
||||
Object.defineProperty(exports, "isConstantNode", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _is.isConstantNode;
|
||||
}
|
||||
});
|
||||
exports.isNumericNode = isNumericNode;
|
||||
Object.defineProperty(exports, "isVariableNode", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _is.isSymbolNode;
|
||||
}
|
||||
});
|
||||
var _is = require("../../../utils/is.js");
|
||||
function isNumericNode(x) {
|
||||
return (0, _is.isConstantNode)(x) || (0, _is.isOperatorNode)(x) && x.isUnary() && (0, _is.isConstantNode)(x.args[0]);
|
||||
}
|
||||
function isConstantExpression(x) {
|
||||
if ((0, _is.isConstantNode)(x)) {
|
||||
// Basic Constant types
|
||||
return true;
|
||||
}
|
||||
if (((0, _is.isFunctionNode)(x) || (0, _is.isOperatorNode)(x)) && x.args.every(isConstantExpression)) {
|
||||
// Can be constant depending on arguments
|
||||
return true;
|
||||
}
|
||||
if ((0, _is.isParenthesisNode)(x) && isConstantExpression(x.content)) {
|
||||
// Parenthesis are transparent
|
||||
return true;
|
||||
}
|
||||
return false; // Probably missing some edge cases
|
||||
}
|
||||
Reference in New Issue
Block a user