@cortex-js/compute-engine 0.23.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/compute-engine.esm.js +13003 -12756
- package/dist/compute-engine.js +12985 -12738
- package/dist/compute-engine.min.esm.js +10 -10
- package/dist/compute-engine.min.js +10 -10
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.js +2 -2
- package/dist/types/common/ansi-codes.d.ts +1 -1
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/signals.d.ts +12 -1
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compute-engine/assume.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +4 -4
- package/dist/types/compute-engine/boxed-expression/box.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +8 -4
- package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +6 -3
- package/dist/types/compute-engine/boxed-expression/boxed-function-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +8 -4
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +5 -3
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +17 -22
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +7 -3
- package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +7 -4
- package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +7 -3
- package/dist/types/compute-engine/boxed-expression/canonical.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/utils.d.ts +2 -9
- package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
- package/dist/types/compute-engine/collection-utils.d.ts +1 -1
- package/dist/types/compute-engine/compile.d.ts +1 -1
- package/dist/types/compute-engine/compute-engine.d.ts +39 -23
- package/dist/types/compute-engine/cost-function.d.ts +1 -1
- package/dist/types/compute-engine/domain-utils.d.ts +1 -1
- package/dist/types/compute-engine/function-utils.d.ts +4 -4
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-complex.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-relational-operators.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-statistics.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse-identifier.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +5 -3
- package/dist/types/compute-engine/latex-syntax/public.d.ts +154 -18
- package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +2 -2
- package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-add.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-divide.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/library/calculus.d.ts +1 -1
- package/dist/types/compute-engine/library/collections.d.ts +1 -1
- package/dist/types/compute-engine/library/complex.d.ts +1 -1
- package/dist/types/compute-engine/library/control-structures.d.ts +1 -1
- package/dist/types/compute-engine/library/core.d.ts +1 -1
- package/dist/types/compute-engine/library/domains.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +1 -1
- package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/library/logic.d.ts +1 -1
- package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/library/random-expression.d.ts +1 -1
- package/dist/types/compute-engine/library/relational-operator.d.ts +2 -1
- package/dist/types/compute-engine/library/sets.d.ts +1 -1
- package/dist/types/compute-engine/library/statistics.d.ts +1 -1
- package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/library/utils.d.ts +1 -1
- package/dist/types/compute-engine/numerics/factor.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +2 -2
- package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
- package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
- package/dist/types/compute-engine/numerics/rationals.d.ts +1 -1
- package/dist/types/compute-engine/numerics/richardson.d.ts +1 -1
- package/dist/types/compute-engine/numerics/terms.d.ts +1 -1
- package/dist/types/compute-engine/public.d.ts +156 -54
- package/dist/types/compute-engine/rules.d.ts +2 -2
- package/dist/types/compute-engine/simplify-rules.d.ts +1 -1
- package/dist/types/compute-engine/solve.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/derivative.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/expand.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/flatten.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/negate.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/product.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/tensor-fields.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/tensors.d.ts +4 -1
- package/dist/types/compute-engine/symbolic/utils.d.ts +1 -1
- package/dist/types/compute-engine.d.ts +2 -2
- package/dist/types/math-json/math-json-format.d.ts +10 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/package.json +8 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.24.0 */
|
|
2
|
+
/** @category MathJSON */
|
|
3
|
+
export type Attributes = {
|
|
2
4
|
/** A human readable string to annotate this expression, since JSON does not
|
|
3
5
|
* allow comments in its encoding */
|
|
4
6
|
comment?: string;
|
|
@@ -54,6 +56,7 @@
|
|
|
54
56
|
*/
|
|
55
57
|
sourceOffsets?: [start: number, end: number];
|
|
56
58
|
};
|
|
59
|
+
/** @category MathJSON */
|
|
57
60
|
export type MathJsonIdentifier = string;
|
|
58
61
|
/**
|
|
59
62
|
* A MathJSON numeric quantity.
|
|
@@ -78,19 +81,24 @@ export type MathJsonIdentifier = string;
|
|
|
78
81
|
* - `0.234e-56`
|
|
79
82
|
* - `1.(3)`
|
|
80
83
|
* - `123456789123456789.123(4567)e999`
|
|
84
|
+
* @category MathJSON
|
|
81
85
|
*/
|
|
82
86
|
export type MathJsonNumber = {
|
|
83
87
|
num: 'NaN' | '-Infinity' | '+Infinity' | string;
|
|
84
88
|
} & Attributes;
|
|
89
|
+
/** @category MathJSON */
|
|
85
90
|
export type MathJsonSymbol = {
|
|
86
91
|
sym: MathJsonIdentifier;
|
|
87
92
|
} & Attributes;
|
|
93
|
+
/** @category MathJSON */
|
|
88
94
|
export type MathJsonString = {
|
|
89
95
|
str: string;
|
|
90
96
|
} & Attributes;
|
|
97
|
+
/** @category MathJSON */
|
|
91
98
|
export type MathJsonFunction = {
|
|
92
99
|
fn: [Expression, ...Expression[]];
|
|
93
100
|
} & Attributes;
|
|
101
|
+
/** @category MathJSON */
|
|
94
102
|
export type MathJsonDictionary = {
|
|
95
103
|
dict: {
|
|
96
104
|
[key: string]: Expression;
|
|
@@ -102,5 +110,6 @@ export type MathJsonDictionary = {
|
|
|
102
110
|
* The leaf nodes of an expression are numbers, strings and symbols.
|
|
103
111
|
* The dictionary and function nodes can contain expressions themselves.
|
|
104
112
|
*
|
|
113
|
+
* @category MathJSON
|
|
105
114
|
*/
|
|
106
115
|
export type Expression = number | MathJsonIdentifier | string | MathJsonNumber | MathJsonString | MathJsonSymbol | MathJsonFunction | MathJsonDictionary | [Expression, ...Expression[]];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.24.0 */
|
|
2
2
|
export declare const MISSING: Expression;
|
|
3
3
|
export declare function isNumberExpression(expr: Expression | null): expr is number | string | MathJsonNumber;
|
|
4
4
|
export declare function isNumberObject(expr: Expression | null): expr is MathJsonNumber;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.24.0 */
|
|
2
2
|
export { isSymbolObject, isStringObject, isFunctionObject, isDictionaryObject, stringValue as getStringValue, head, headName, symbol, applyRecursively, mapArgs, op, nops, dictionary as getDictionary, } from './math-json/utils';
|
|
3
|
-
export declare const version = "0.
|
|
3
|
+
export declare const version = "0.24.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.24.0",
|
|
3
3
|
"scripts": {
|
|
4
|
+
"doc": "bash ./scripts/doc.sh",
|
|
4
5
|
"build": "bash ./scripts/build.sh",
|
|
5
6
|
"clean": "bash ./scripts/clean.sh",
|
|
6
7
|
"coverage": "bash ./scripts/test.sh coverage",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"@typescript-eslint/typescript-estree": "^6.7.2",
|
|
65
66
|
"chalk": "^5.3.0",
|
|
66
67
|
"check-node-version": "^4.2.1",
|
|
68
|
+
"concat-md": "^0.5.1",
|
|
67
69
|
"esbuild": "^0.19.3",
|
|
68
70
|
"eslint": "^8.50.0",
|
|
69
71
|
"eslint-config-prettier": "^9.0.0",
|
|
@@ -74,12 +76,15 @@
|
|
|
74
76
|
"jest-silent-reporter": "^0.5.0",
|
|
75
77
|
"open": "^9.1.0",
|
|
76
78
|
"prettier": "^3.0.3",
|
|
79
|
+
"prettier-2": "npm:prettier@^2",
|
|
77
80
|
"serve-http": "^1.0.7",
|
|
78
81
|
"ts-jest": "^29.1.1",
|
|
79
82
|
"ts-node": "^10.9.1",
|
|
83
|
+
"typedoc": "^0.25.8",
|
|
84
|
+
"typedoc-plugin-markdown": "^4.0.0-next.53",
|
|
85
|
+
"typedoc-plugin-no-inherit": "^1.4.0",
|
|
80
86
|
"typescript": "^5.2.2",
|
|
81
|
-
"update-notifier": "^6.0.2"
|
|
82
|
-
"prettier-2": "npm:prettier@^2"
|
|
87
|
+
"update-notifier": "^6.0.2"
|
|
83
88
|
},
|
|
84
89
|
"prettier": "@cortex-js/prettier-config",
|
|
85
90
|
"dependencies": {
|