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

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.derivativeDocs = void 0;
const derivativeDocs = exports.derivativeDocs = {
name: 'derivative',
category: 'Algebra',
syntax: ['derivative(expr, variable)', 'derivative(expr, variable, {simplify: boolean})'],
description: 'Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.',
examples: ['derivative("2x^3", "x")', 'derivative("2x^3", "x", {simplify: false})', 'derivative("2x^2 + 3x + 4", "x")', 'derivative("sin(2x)", "x")', 'f = parse("x^2 + x")', 'x = parse("x")', 'df = derivative(f, x)', 'df.evaluate({x: 3})'],
seealso: ['simplify', 'parse', 'evaluate']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.leafCountDocs = void 0;
const leafCountDocs = exports.leafCountDocs = {
name: 'leafCount',
category: 'Algebra',
syntax: ['leafCount(expr)'],
description: 'Computes the number of leaves in the parse tree of the given expression',
examples: ['leafCount("e^(i*pi)-1")', 'leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],
seealso: ['simplify']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lsolveDocs = void 0;
const lsolveDocs = exports.lsolveDocs = {
name: 'lsolve',
category: 'Algebra',
syntax: ['x=lsolve(L, b)'],
description: 'Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.',
examples: ['a = [-2, 3; 2, 1]', 'b = [11, 9]', 'x = lsolve(a, b)'],
seealso: ['lsolveAll', 'lup', 'lusolve', 'usolve', 'matrix', 'sparse']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lsolveAllDocs = void 0;
const lsolveAllDocs = exports.lsolveAllDocs = {
name: 'lsolveAll',
category: 'Algebra',
syntax: ['x=lsolveAll(L, b)'],
description: 'Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.',
examples: ['a = [-2, 3; 2, 1]', 'b = [11, 9]', 'x = lsolve(a, b)'],
seealso: ['lsolve', 'lup', 'lusolve', 'usolve', 'matrix', 'sparse']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lupDocs = void 0;
const lupDocs = exports.lupDocs = {
name: 'lup',
category: 'Algebra',
syntax: ['lup(m)'],
description: 'Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U',
examples: ['lup([[2, 1], [1, 4]])', 'lup(matrix([[2, 1], [1, 4]]))', 'lup(sparse([[2, 1], [1, 4]]))'],
seealso: ['lusolve', 'lsolve', 'usolve', 'matrix', 'sparse', 'slu', 'qr']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lusolveDocs = void 0;
const lusolveDocs = exports.lusolveDocs = {
name: 'lusolve',
category: 'Algebra',
syntax: ['x=lusolve(A, b)', 'x=lusolve(lu, b)'],
description: 'Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.',
examples: ['a = [-2, 3; 2, 1]', 'b = [11, 9]', 'x = lusolve(a, b)'],
seealso: ['lup', 'slu', 'lsolve', 'usolve', 'matrix', 'sparse']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.lyapDocs = void 0;
const lyapDocs = exports.lyapDocs = {
name: 'lyap',
category: 'Algebra',
syntax: ['lyap(A,Q)'],
description: 'Solves the Continuous-time Lyapunov equation AP+PA\'+Q=0 for P',
examples: ['lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])', 'A = [[-2, 0], [1, -4]]', 'Q = [[3, 1], [1, 3]]', 'lyap(A,Q)'],
seealso: ['schur', 'sylvester']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.polynomialRootDocs = void 0;
const polynomialRootDocs = exports.polynomialRootDocs = {
name: 'polynomialRoot',
category: 'Algebra',
syntax: ['x=polynomialRoot(-6, 3)', 'x=polynomialRoot(4, -4, 1)', 'x=polynomialRoot(-8, 12, -6, 1)'],
description: 'Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.',
examples: ['a = polynomialRoot(-6, 11, -6, 1)'],
seealso: ['cbrt', 'sqrt']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.qrDocs = void 0;
const qrDocs = exports.qrDocs = {
name: 'qr',
category: 'Algebra',
syntax: ['qr(A)'],
description: 'Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.',
examples: ['qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])'],
seealso: ['lup', 'slu', 'matrix']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.rationalizeDocs = void 0;
const rationalizeDocs = exports.rationalizeDocs = {
name: 'rationalize',
category: 'Algebra',
syntax: ['rationalize(expr)', 'rationalize(expr, scope)', 'rationalize(expr, scope, detailed)'],
description: 'Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.',
examples: ['rationalize("2x/y - y/(x+1)")', 'rationalize("2x/y - y/(x+1)", true)'],
seealso: ['simplify']
};

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.resolveDocs = void 0;
const resolveDocs = exports.resolveDocs = {
name: 'resolve',
category: 'Algebra',
syntax: ['resolve(node, scope)'],
description: 'Recursively substitute variables in an expression tree.',
examples: ['resolve(parse("1 + x"), { x: 7 })', 'resolve(parse("size(text)"), { text: "Hello World" })', 'resolve(parse("x + y"), { x: parse("3z") })', 'resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],
seealso: ['simplify', 'evaluate'],
mayThrow: ['ReferenceError']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.schurDocs = void 0;
const schurDocs = exports.schurDocs = {
name: 'schur',
category: 'Algebra',
syntax: ['schur(A)'],
description: 'Performs a real Schur decomposition of the real matrix A = UTU\'',
examples: ['schur([[1, 0], [-4, 3]])', 'A = [[1, 0], [-4, 3]]', 'schur(A)'],
seealso: ['lyap', 'sylvester']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.simplifyDocs = void 0;
const simplifyDocs = exports.simplifyDocs = {
name: 'simplify',
category: 'Algebra',
syntax: ['simplify(expr)', 'simplify(expr, rules)'],
description: 'Simplify an expression tree.',
examples: ['simplify("3 + 2 / 4")', 'simplify("2x + x")', 'f = parse("x * (x + 2 + x)")', 'simplified = simplify(f)', 'simplified.evaluate({x: 2})'],
seealso: ['simplifyCore', 'derivative', 'evaluate', 'parse', 'rationalize', 'resolve']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.simplifyConstantDocs = void 0;
const simplifyConstantDocs = exports.simplifyConstantDocs = {
name: 'simplifyConstant',
category: 'Algebra',
syntax: ['simplifyConstant(expr)', 'simplifyConstant(expr, options)'],
description: 'Replace constant subexpressions of node with their values.',
examples: ['simplifyConstant("(3-3)*x")', 'simplifyConstant(parse("z-cos(tau/8)"))'],
seealso: ['simplify', 'simplifyCore', 'evaluate']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.simplifyCoreDocs = void 0;
const simplifyCoreDocs = exports.simplifyCoreDocs = {
name: 'simplifyCore',
category: 'Algebra',
syntax: ['simplifyCore(node)'],
description: 'Perform simple one-pass simplifications on an expression tree.',
examples: ['simplifyCore(parse("0*x"))', 'simplifyCore(parse("(x+0)*2"))'],
seealso: ['simplify', 'simplifyConstant', 'evaluate']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.sluDocs = void 0;
const sluDocs = exports.sluDocs = {
name: 'slu',
category: 'Algebra',
syntax: ['slu(A, order, threshold)'],
description: 'Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U',
examples: ['slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)'],
seealso: ['lusolve', 'lsolve', 'usolve', 'matrix', 'sparse', 'lup', 'qr']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.sylvesterDocs = void 0;
const sylvesterDocs = exports.sylvesterDocs = {
name: 'sylvester',
category: 'Algebra',
syntax: ['sylvester(A,B,C)'],
description: 'Solves the real-valued Sylvester equation AX+XB=C for X',
examples: ['sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])', 'A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]', 'sylvester(A, B, C)'],
seealso: ['schur', 'lyap']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.symbolicEqualDocs = void 0;
const symbolicEqualDocs = exports.symbolicEqualDocs = {
name: 'symbolicEqual',
category: 'Algebra',
syntax: ['symbolicEqual(expr1, expr2)', 'symbolicEqual(expr1, expr2, options)'],
description: 'Returns true if the difference of the expressions simplifies to 0',
examples: ['symbolicEqual("x*y","y*x")', 'symbolicEqual("abs(x^2)", "x^2")', 'symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],
seealso: ['simplify', 'evaluate']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.usolveDocs = void 0;
const usolveDocs = exports.usolveDocs = {
name: 'usolve',
category: 'Algebra',
syntax: ['x=usolve(U, b)'],
description: 'Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.',
examples: ['x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])'],
seealso: ['usolveAll', 'lup', 'lusolve', 'lsolve', 'matrix', 'sparse']
};

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.usolveAllDocs = void 0;
const usolveAllDocs = exports.usolveAllDocs = {
name: 'usolveAll',
category: 'Algebra',
syntax: ['x=usolve(U, b)'],
description: 'Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.',
examples: ['x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])'],
seealso: ['usolve', 'lup', 'lusolve', 'lsolve', 'matrix', 'sparse']
};