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,8 @@
export var combinationsDocs = {
name: 'combinations',
category: 'Probability',
syntax: ['combinations(n, k)'],
description: 'Compute the number of combinations of n items taken k at a time',
examples: ['combinations(7, 5)'],
seealso: ['combinationsWithRep', 'permutations', 'factorial']
};

View File

@@ -0,0 +1,8 @@
export var combinationsWithRepDocs = {
name: 'combinationsWithRep',
category: 'Probability',
syntax: ['combinationsWithRep(n, k)'],
description: 'Compute the number of combinations of n items taken k at a time with replacements.',
examples: ['combinationsWithRep(7, 5)'],
seealso: ['combinations', 'permutations', 'factorial']
};

View File

@@ -0,0 +1,8 @@
export var distributionDocs = {
name: 'distribution',
category: 'Probability',
syntax: ['distribution(name)', 'distribution(name, arg1, arg2, ...)'],
description: 'Create a distribution object of a specific type. ' + 'A distribution object contains functions `random([size,] [min,] [max])`, ' + '`randomInt([size,] [min,] [max])` and `pickRandom(array)`. ' + 'Available types of distributions: "uniform", "normal". ' + 'Note that the function distribution is currently not available via the expression parser.',
examples: [],
seealso: ['random', 'randomInt']
};

View File

@@ -0,0 +1,8 @@
export var factorialDocs = {
name: 'factorial',
category: 'Probability',
syntax: ['n!', 'factorial(n)'],
description: 'Compute the factorial of a value',
examples: ['5!', '5 * 4 * 3 * 2 * 1', '3!'],
seealso: ['combinations', 'combinationsWithRep', 'permutations', 'gamma']
};

View File

@@ -0,0 +1,8 @@
export var gammaDocs = {
name: 'gamma',
category: 'Probability',
syntax: ['gamma(n)'],
description: 'Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.',
examples: ['gamma(4)', '3!', 'gamma(1/2)', 'sqrt(pi)'],
seealso: ['factorial']
};

View File

@@ -0,0 +1,8 @@
export var kldivergenceDocs = {
name: 'kldivergence',
category: 'Probability',
syntax: ['kldivergence(x, y)'],
description: 'Calculate the Kullback-Leibler (KL) divergence between two distributions.',
examples: ['kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])'],
seealso: []
};

View File

@@ -0,0 +1,8 @@
export var lgammaDocs = {
name: 'lgamma',
category: 'Probability',
syntax: ['lgamma(n)'],
description: 'Logarithm of the gamma function for real, positive numbers and complex numbers, ' + 'using Lanczos approximation for numbers and Stirling series for complex numbers.',
examples: ['lgamma(4)', 'lgamma(1/2)', 'lgamma(i)', 'lgamma(complex(1.1, 2))'],
seealso: ['gamma']
};

View File

@@ -0,0 +1,8 @@
export var multinomialDocs = {
name: 'multinomial',
category: 'Probability',
syntax: ['multinomial(A)'],
description: 'Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.',
examples: ['multinomial([1, 2, 1])'],
seealso: ['combinations', 'factorial']
};

View File

@@ -0,0 +1,8 @@
export var permutationsDocs = {
name: 'permutations',
category: 'Probability',
syntax: ['permutations(n)', 'permutations(n, k)'],
description: 'Compute the number of permutations of n items taken k at a time',
examples: ['permutations(5)', 'permutations(5, 3)'],
seealso: ['combinations', 'combinationsWithRep', 'factorial']
};

View File

@@ -0,0 +1,8 @@
export var pickRandomDocs = {
name: 'pickRandom',
category: 'Probability',
syntax: ['pickRandom(array)', 'pickRandom(array, number)', 'pickRandom(array, weights)', 'pickRandom(array, number, weights)', 'pickRandom(array, weights, number)'],
description: 'Pick a random entry from a given array.',
examples: ['pickRandom(0:10)', 'pickRandom([1, 3, 1, 6])', 'pickRandom([1, 3, 1, 6], 2)', 'pickRandom([1, 3, 1, 6], [2, 3, 2, 1])', 'pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])', 'pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)'],
seealso: ['random', 'randomInt']
};

View File

@@ -0,0 +1,8 @@
export var randomDocs = {
name: 'random',
category: 'Probability',
syntax: ['random()', 'random(max)', 'random(min, max)', 'random(size)', 'random(size, max)', 'random(size, min, max)'],
description: 'Return a random number.',
examples: ['random()', 'random(10, 20)', 'random([2, 3])'],
seealso: ['pickRandom', 'randomInt']
};

View File

@@ -0,0 +1,8 @@
export var randomIntDocs = {
name: 'randomInt',
category: 'Probability',
syntax: ['randomInt(max)', 'randomInt(min, max)', 'randomInt(size)', 'randomInt(size, max)', 'randomInt(size, min, max)'],
description: 'Return a random integer number',
examples: ['randomInt(10, 20)', 'randomInt([2, 3], 10)'],
seealso: ['pickRandom', 'random']
};