@cortex-js/compute-engine 0.7.0 → 0.8.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/dist/compute-engine.esm.js +746 -671
- package/dist/compute-engine.min.esm.js +2 -2
- package/dist/compute-engine.min.js +2 -2
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.js +2 -2
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/signals.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 +65 -62
- package/dist/types/compute-engine/boxed-expression/box.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +1 -1
- 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 +38 -31
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +4 -2
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +6 -6
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +6 -6
- 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 +3 -3
- package/dist/types/compute-engine/compute-engine.d.ts +2 -3
- 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/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-core.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-inequalities.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-sets.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.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/public.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +1 -1
- 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/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/logic.d.ts +1 -1
- package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/library/relational-operator.d.ts +1 -1
- package/dist/types/compute-engine/library/sets.d.ts +1 -1
- package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-decimal.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/public.d.ts +514 -351
- package/dist/types/compute-engine/rules.d.ts +1 -1
- package/dist/types/compute-engine/simplify-rules.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/sum.d.ts +1 -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 +1 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/package.json +1 -1
package/dist/math-json.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** MathJSON 0.
|
|
1
|
+
/** MathJSON 0.8.0 */
|
|
2
2
|
/**
|
|
3
3
|
* These constants are the 'primitive' functions and constants that are used
|
|
4
4
|
* for some basic manipulations such as parsing, and transforming to canonical
|
|
@@ -229,6 +229,6 @@ function asValidJSONNumber(num) {
|
|
|
229
229
|
// }
|
|
230
230
|
|
|
231
231
|
// This is the root of the `math-json` package (i.e. `math-json.js` and
|
|
232
|
-
const version = '0.
|
|
232
|
+
const version = '0.8.0';
|
|
233
233
|
|
|
234
234
|
export { applyRecursively, asValidJSONNumber, dictionary as getDictionary, stringValue as getStringValue, head, headName, isAtomic, isDictionaryObject, isFunctionObject, isStringObject, isSymbolObject, mapArgs, nops, op, symbol, version };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** MathJSON 0.
|
|
2
|
-
function n(n){return null!==n&&"object"==typeof n&&"sym"in n}function t(n){return null!==n&&"object"==typeof n&&"str"in n}function r(n){return null!==n&&"object"==typeof n&&"fn"in n}function u(n){return null!==n&&"object"==typeof n&&"dict"in n}function l(n){return null===n||!Array.isArray(n)&&("object"!=typeof n||!("fn"in n||"dic"in n))}function e(n){return null==n?null:"object"==typeof n&&"str"in n?n.str:"string"!=typeof n||n.length<2||"'"!==n[0]||"'"!==n[n.length-1]?null:n.substring(1,n.length-1)}function i(n){return null==n?null:Array.isArray(n)?n[0]:r(n)?n.fn[0]:null}function o(n){const t=i(n);return"string"==typeof t?t:""}function f(n,t){return null==n?null:Array.isArray(n)?n[t]??null:r(n)?n.fn[t]??null:null}function c(n){return null==n?null:Array.isArray(n)?n.slice(1):r(n)?n.fn.slice(1):null}function s(n){return null==n?0:Array.isArray(n)?Math.max(0,n.length-1):r(n)?Math.max(0,n.fn.length-1):0}function y(t){if(null==t)return null;const r=n(t)?t.sym:t;return"string"!=typeof r||r.length>=2&&"'"===r[0]&&"'"===r[r.length-1]?null:r}function a(n){const t=i(n);if("KeyValuePair"===t||"Tuple"===t||"Pair"===t){const t=e(f(n,1));return t?[t,f(n,2)??"Nothing"]:null}return null}function g(n){if(null===n)return null;if("object"==typeof n&&"dict"in n)return n.dict;const t=a(n);if(t)return{[t[0]]:t[1]};if("Dictionary"===i(n)){const t={};for(let r=1;r<s(n);r++){const u=a(f(n,r));u&&(t[u[0]]=u[1])}return t}return null}function p(n,t){const r=i(n);if(null!==r)return[t(r),...(c(n)??[]).map(t)];const u=g(n);if(null!==u){const n=Object.keys(u),r={};for(const l of n)r[l]=t(u[l]);return{dict:r}}return t(n)}function h(n,t){let u=null;if(Array.isArray(n)&&(u=n),r(n)&&(u=n.fn),null===u)return[];let l=1;const e=[];for(;l<u.length;)e.push(t(u[l])),l+=1;return e}function A(n){if("string"==typeof n){const t=Number(n);if("+"===n[0]&&(n=n.slice(1)),t.toString()===n)return isNaN(t)||!isFinite(t)?t.toString():t}return n}const b="0.
|
|
1
|
+
/** MathJSON 0.8.0 */
|
|
2
|
+
function n(n){return null!==n&&"object"==typeof n&&"sym"in n}function t(n){return null!==n&&"object"==typeof n&&"str"in n}function r(n){return null!==n&&"object"==typeof n&&"fn"in n}function u(n){return null!==n&&"object"==typeof n&&"dict"in n}function l(n){return null===n||!Array.isArray(n)&&("object"!=typeof n||!("fn"in n||"dic"in n))}function e(n){return null==n?null:"object"==typeof n&&"str"in n?n.str:"string"!=typeof n||n.length<2||"'"!==n[0]||"'"!==n[n.length-1]?null:n.substring(1,n.length-1)}function i(n){return null==n?null:Array.isArray(n)?n[0]:r(n)?n.fn[0]:null}function o(n){const t=i(n);return"string"==typeof t?t:""}function f(n,t){return null==n?null:Array.isArray(n)?n[t]??null:r(n)?n.fn[t]??null:null}function c(n){return null==n?null:Array.isArray(n)?n.slice(1):r(n)?n.fn.slice(1):null}function s(n){return null==n?0:Array.isArray(n)?Math.max(0,n.length-1):r(n)?Math.max(0,n.fn.length-1):0}function y(t){if(null==t)return null;const r=n(t)?t.sym:t;return"string"!=typeof r||r.length>=2&&"'"===r[0]&&"'"===r[r.length-1]?null:r}function a(n){const t=i(n);if("KeyValuePair"===t||"Tuple"===t||"Pair"===t){const t=e(f(n,1));return t?[t,f(n,2)??"Nothing"]:null}return null}function g(n){if(null===n)return null;if("object"==typeof n&&"dict"in n)return n.dict;const t=a(n);if(t)return{[t[0]]:t[1]};if("Dictionary"===i(n)){const t={};for(let r=1;r<s(n);r++){const u=a(f(n,r));u&&(t[u[0]]=u[1])}return t}return null}function p(n,t){const r=i(n);if(null!==r)return[t(r),...(c(n)??[]).map(t)];const u=g(n);if(null!==u){const n=Object.keys(u),r={};for(const l of n)r[l]=t(u[l]);return{dict:r}}return t(n)}function h(n,t){let u=null;if(Array.isArray(n)&&(u=n),r(n)&&(u=n.fn),null===u)return[];let l=1;const e=[];for(;l<u.length;)e.push(t(u[l])),l+=1;return e}function A(n){if("string"==typeof n){const t=Number(n);if("+"===n[0]&&(n=n.slice(1)),t.toString()===n)return isNaN(t)||!isFinite(t)?t.toString():t}return n}const b="0.8.0";export{p as applyRecursively,A as asValidJSONNumber,g as getDictionary,e as getStringValue,i as head,o as headName,l as isAtomic,u as isDictionaryObject,r as isFunctionObject,t as isStringObject,n as isSymbolObject,h as mapArgs,s as nops,f as op,y as symbol,b as version};
|
package/dist/math-json.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** MathJSON 0.
|
|
2
|
-
var global,factory;global=this,factory=function(n){function t(n){return null!==n&&"object"==typeof n&&"sym"in n}function r(n){return null!==n&&"object"==typeof n&&"fn"in n}function l(n){return null==n?null:"object"==typeof n&&"str"in n?n.str:"string"!=typeof n||n.length<2||"'"!==n[0]||"'"!==n[n.length-1]?null:n.substring(1,n.length-1)}function e(n){return null==n?null:Array.isArray(n)?n[0]:r(n)?n.fn[0]:null}function i(n,t){var l,e;return null==n?null:Array.isArray(n)?null!==(l=n[t])&&void 0!==l?l:null:r(n)&&null!==(e=n.fn[t])&&void 0!==e?e:null}function u(n){return null==n?null:Array.isArray(n)?n.slice(1):r(n)?n.fn.slice(1):null}function o(n){return null==n?0:Array.isArray(n)?Math.max(0,n.length-1):r(n)?Math.max(0,n.fn.length-1):0}function f(n){var t;const r=e(n);if("KeyValuePair"===r||"Tuple"===r||"Pair"===r){const r=l(i(n,1));return r?[r,null!==(t=i(n,2))&&void 0!==t?t:"Nothing"]:null}return null}function c(n){if(null===n)return null;if("object"==typeof n&&"dict"in n)return n.dict;const t=f(n);if(t)return{[t[0]]:t[1]};if("Dictionary"===e(n)){const t={};for(let r=1;r<o(n);r++){const l=f(i(n,r));l&&(t[l[0]]=l[1])}return t}return null}n.applyRecursively=function(n,t){var r;const l=e(n);if(null!==l)return[t(l),...(null!==(r=u(n))&&void 0!==r?r:[]).map(t)];const i=c(n);if(null!==i){const n=Object.keys(i),r={};for(const l of n)r[l]=t(i[l]);return{dict:r}}return t(n)},n.asValidJSONNumber=function(n){if("string"==typeof n){const t=Number(n);if("+"===n[0]&&(n=n.slice(1)),t.toString()===n)return isNaN(t)||!isFinite(t)?t.toString():t}return n},n.getDictionary=c,n.getStringValue=l,n.head=e,n.headName=function(n){const t=e(n);return"string"==typeof t?t:""},n.isAtomic=function(n){return null===n||!Array.isArray(n)&&("object"!=typeof n||!("fn"in n||"dic"in n))},n.isDictionaryObject=function(n){return null!==n&&"object"==typeof n&&"dict"in n},n.isFunctionObject=r,n.isStringObject=function(n){return null!==n&&"object"==typeof n&&"str"in n},n.isSymbolObject=t,n.mapArgs=function(n,t){let l=null;if(Array.isArray(n)&&(l=n),r(n)&&(l=n.fn),null===l)return[];let e=1;const i=[];for(;e<l.length;)i.push(t(l[e])),e+=1;return i},n.nops=o,n.op=i,n.symbol=function(n){if(null==n)return null;const r=t(n)?n.sym:n;return"string"!=typeof r||r.length>=2&&"'"===r[0]&&"'"===r[r.length-1]?null:r},n.version="0.
|
|
1
|
+
/** MathJSON 0.8.0 */
|
|
2
|
+
var global,factory;global=this,factory=function(n){function t(n){return null!==n&&"object"==typeof n&&"sym"in n}function r(n){return null!==n&&"object"==typeof n&&"fn"in n}function l(n){return null==n?null:"object"==typeof n&&"str"in n?n.str:"string"!=typeof n||n.length<2||"'"!==n[0]||"'"!==n[n.length-1]?null:n.substring(1,n.length-1)}function e(n){return null==n?null:Array.isArray(n)?n[0]:r(n)?n.fn[0]:null}function i(n,t){var l,e;return null==n?null:Array.isArray(n)?null!==(l=n[t])&&void 0!==l?l:null:r(n)&&null!==(e=n.fn[t])&&void 0!==e?e:null}function u(n){return null==n?null:Array.isArray(n)?n.slice(1):r(n)?n.fn.slice(1):null}function o(n){return null==n?0:Array.isArray(n)?Math.max(0,n.length-1):r(n)?Math.max(0,n.fn.length-1):0}function f(n){var t;const r=e(n);if("KeyValuePair"===r||"Tuple"===r||"Pair"===r){const r=l(i(n,1));return r?[r,null!==(t=i(n,2))&&void 0!==t?t:"Nothing"]:null}return null}function c(n){if(null===n)return null;if("object"==typeof n&&"dict"in n)return n.dict;const t=f(n);if(t)return{[t[0]]:t[1]};if("Dictionary"===e(n)){const t={};for(let r=1;r<o(n);r++){const l=f(i(n,r));l&&(t[l[0]]=l[1])}return t}return null}n.applyRecursively=function(n,t){var r;const l=e(n);if(null!==l)return[t(l),...(null!==(r=u(n))&&void 0!==r?r:[]).map(t)];const i=c(n);if(null!==i){const n=Object.keys(i),r={};for(const l of n)r[l]=t(i[l]);return{dict:r}}return t(n)},n.asValidJSONNumber=function(n){if("string"==typeof n){const t=Number(n);if("+"===n[0]&&(n=n.slice(1)),t.toString()===n)return isNaN(t)||!isFinite(t)?t.toString():t}return n},n.getDictionary=c,n.getStringValue=l,n.head=e,n.headName=function(n){const t=e(n);return"string"==typeof t?t:""},n.isAtomic=function(n){return null===n||!Array.isArray(n)&&("object"!=typeof n||!("fn"in n||"dic"in n))},n.isDictionaryObject=function(n){return null!==n&&"object"==typeof n&&"dict"in n},n.isFunctionObject=r,n.isStringObject=function(n){return null!==n&&"object"==typeof n&&"str"in n},n.isSymbolObject=t,n.mapArgs=function(n,t){let l=null;if(Array.isArray(n)&&(l=n),r(n)&&(l=n.fn),null===l)return[];let e=1;const i=[];for(;e<l.length;)i.push(t(l[e])),e+=1;return i},n.nops=o,n.op=i,n.symbol=function(n){if(null==n)return null;const r=t(n)?n.sym:n;return"string"!=typeof r||r.length>=2&&"'"===r[0]&&"'"===r[r.length-1]?null:r},n.version="0.8.0",Object.defineProperty(n,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).MathJson={});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare type SignalCode = RuntimeSignalCode | ('invalid-name' | 'expected-predicate' | 'expected-symbol' | 'operator-requires-one-operand' | 'postfix-operator-requires-one-operand' | 'prefix-operator-requires-one-operand' | 'unbalanced-symbols' | 'expected-argument' | 'unexpected-command' | 'cyclic-definition' | 'invalid-supersets' | 'expected-supersets' | 'unknown-domain' | 'duplicate-wikidata' | 'invalid-dictionary-entry' | 'syntax-error');
|
|
3
3
|
export declare type SignalMessage = SignalCode | [SignalCode, ...any[]];
|
|
4
4
|
export declare type SignalOrigin = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import type { Complex } from 'complex.js';
|
|
3
3
|
import { Expression } from '../../math-json/math-json-format';
|
|
4
4
|
import { BoxedExpression, BoxedFunctionDefinition, BoxedRuleSet, BoxedSymbolDefinition, BoxedDomain, EvaluateOptions, IComputeEngine, LatexString, Metadata, NOptions, PatternMatchOption, SemiBoxedExpression, SimplifyOptions, Substitution, RuntimeScope, DomainCompatibility, DomainLiteral, BoxedBaseDefinition } from '../public';
|
|
@@ -6,62 +6,69 @@ import { BoxedExpression, BoxedFunctionDefinition, BoxedRuleSet, BoxedSymbolDefi
|
|
|
6
6
|
* AbstractBoxedExpression
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class AbstractBoxedExpression implements BoxedExpression {
|
|
9
|
-
abstract
|
|
10
|
-
abstract
|
|
11
|
-
abstract
|
|
12
|
-
abstract isEqual(rhs: BoxedExpression): boolean;
|
|
9
|
+
abstract readonly hash: number;
|
|
10
|
+
abstract readonly json: Expression;
|
|
11
|
+
abstract readonly head: BoxedExpression | string;
|
|
13
12
|
abstract get isCanonical(): boolean;
|
|
14
13
|
abstract set isCanonical(_val: boolean);
|
|
15
|
-
abstract
|
|
14
|
+
abstract isSame(rhs: BoxedExpression): boolean;
|
|
15
|
+
abstract isEqual(rhs: BoxedExpression): boolean;
|
|
16
16
|
abstract match(rhs: BoxedExpression, options?: PatternMatchOption): Substitution | null;
|
|
17
17
|
readonly engine: IComputeEngine;
|
|
18
18
|
/** Verbatim LaTeX, obtained from a source, i.e. from parsing, not generated
|
|
19
19
|
* synthetically
|
|
20
20
|
*/
|
|
21
21
|
protected _latex?: string;
|
|
22
|
-
protected _wikidata
|
|
22
|
+
protected _wikidata: string | undefined;
|
|
23
23
|
constructor(ce: IComputeEngine, metadata?: Metadata);
|
|
24
|
-
/** Object.
|
|
25
|
-
|
|
24
|
+
/** `Object.valueOf()`: return a primitive value for the object
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
valueOf(): number | string | boolean;
|
|
26
28
|
/** Object.toString() */
|
|
27
29
|
toString(): string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
[Symbol.toPrimitive](hint: 'number' | 'string' | 'default'): number | string | null;
|
|
31
|
+
/** Called by `JSON.stringify()` when serializing to json */
|
|
32
|
+
toJSON(): Expression;
|
|
30
33
|
/** Object.is() */
|
|
31
34
|
is(rhs: any): boolean;
|
|
32
|
-
isCompatible(_dom: BoxedDomain | DomainLiteral, _kind?: DomainCompatibility): boolean;
|
|
33
|
-
has(_v: string | string[]): boolean;
|
|
34
|
-
get description(): string[];
|
|
35
|
-
get url(): string;
|
|
36
|
-
get isPure(): boolean;
|
|
37
|
-
/** For a symbol, true if the symbol is a free variable (no value) */
|
|
38
|
-
get isFree(): boolean;
|
|
39
|
-
/** For a symbol, true if the symbol is a constant (unchangeable value) */
|
|
40
|
-
get isConstant(): boolean;
|
|
41
|
-
get isLiteral(): boolean;
|
|
42
35
|
get latex(): LatexString;
|
|
43
36
|
set latex(val: LatexString);
|
|
44
|
-
get
|
|
45
|
-
|
|
46
|
-
get
|
|
47
|
-
get symbols(): BoxedExpression[];
|
|
37
|
+
get symbol(): string | null;
|
|
38
|
+
get isNothing(): boolean;
|
|
39
|
+
get string(): string | null;
|
|
48
40
|
getSubexpressions(head: string): BoxedExpression[];
|
|
49
41
|
get subexpressions(): BoxedExpression[];
|
|
42
|
+
get symbols(): BoxedExpression[];
|
|
50
43
|
get errors(): BoxedExpression[];
|
|
51
44
|
get ops(): null | BoxedExpression[];
|
|
52
45
|
get nops(): number;
|
|
53
46
|
get op1(): BoxedExpression;
|
|
54
47
|
get op2(): BoxedExpression;
|
|
55
48
|
get op3(): BoxedExpression;
|
|
56
|
-
get
|
|
57
|
-
get
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
get
|
|
62
|
-
get
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
get isValid(): boolean;
|
|
50
|
+
get isPure(): boolean;
|
|
51
|
+
/** For a symbol, true if the symbol is a free variable (no value) */
|
|
52
|
+
get isFree(): boolean;
|
|
53
|
+
/** For a symbol, true if the symbol is a constant (unchangeable value) */
|
|
54
|
+
get isConstant(): boolean;
|
|
55
|
+
get canonical(): BoxedExpression;
|
|
56
|
+
apply(_fn: (x: BoxedExpression) => SemiBoxedExpression, _head?: string): BoxedExpression;
|
|
57
|
+
subs(_sub: Substitution): BoxedExpression;
|
|
58
|
+
solve(_vars: Iterable<string>): null | BoxedExpression[];
|
|
59
|
+
replace(_rules: BoxedRuleSet): null | BoxedExpression;
|
|
60
|
+
has(_v: string | string[]): boolean;
|
|
61
|
+
get isNaN(): boolean | undefined;
|
|
62
|
+
get isZero(): boolean | undefined;
|
|
63
|
+
get isNotZero(): boolean | undefined;
|
|
64
|
+
get isOne(): boolean | undefined;
|
|
65
|
+
get isNegativeOne(): boolean | undefined;
|
|
66
|
+
get isInfinity(): boolean | undefined;
|
|
67
|
+
get isFinite(): boolean | undefined;
|
|
68
|
+
get isEven(): boolean | undefined;
|
|
69
|
+
get isOdd(): boolean | undefined;
|
|
70
|
+
get isPrime(): boolean | undefined;
|
|
71
|
+
get isComposite(): boolean | undefined;
|
|
65
72
|
get machineValue(): number | null;
|
|
66
73
|
get rationalValue(): [numer: number, denom: number] | [null, null];
|
|
67
74
|
get decimalValue(): Decimal | null;
|
|
@@ -70,30 +77,37 @@ export declare abstract class AbstractBoxedExpression implements BoxedExpression
|
|
|
70
77
|
get asSmallInteger(): number | null;
|
|
71
78
|
get asRational(): [number, number] | [null, null];
|
|
72
79
|
get sgn(): -1 | 0 | 1 | undefined | null;
|
|
73
|
-
get symbol(): string | null;
|
|
74
|
-
get isNothing(): boolean;
|
|
75
|
-
get isValid(): boolean;
|
|
76
|
-
get value(): BoxedExpression | undefined;
|
|
77
|
-
set value(_value: BoxedExpression | number | undefined);
|
|
78
|
-
get numericValue(): BoxedExpression | undefined;
|
|
79
|
-
isSubdomainOf(_d: BoxedExpression | string): undefined | boolean;
|
|
80
|
-
get domain(): BoxedDomain;
|
|
81
|
-
set domain(_domain: BoxedDomain);
|
|
82
|
-
get explicitDomain(): BoxedDomain | null;
|
|
83
|
-
get string(): string | null;
|
|
84
80
|
isLess(_rhs: BoxedExpression): boolean | undefined;
|
|
85
81
|
isLessEqual(_rhs: BoxedExpression): boolean | undefined;
|
|
86
82
|
isGreater(_rhs: BoxedExpression): boolean | undefined;
|
|
87
83
|
isGreaterEqual(_rhs: BoxedExpression): boolean | undefined;
|
|
88
|
-
get isZero(): boolean | undefined;
|
|
89
|
-
get isNotZero(): boolean | undefined;
|
|
90
84
|
get isPositive(): boolean | undefined;
|
|
91
85
|
get isNonNegative(): boolean | undefined;
|
|
92
86
|
get isNegative(): boolean | undefined;
|
|
93
87
|
get isNonPositive(): boolean | undefined;
|
|
94
|
-
|
|
95
|
-
get
|
|
96
|
-
get
|
|
88
|
+
isCompatible(_dom: BoxedDomain | DomainLiteral, _kind?: DomainCompatibility): boolean;
|
|
89
|
+
get description(): string[] | undefined;
|
|
90
|
+
get url(): string | undefined;
|
|
91
|
+
get isLiteral(): boolean;
|
|
92
|
+
get wikidata(): string | undefined;
|
|
93
|
+
set wikidata(val: string | undefined);
|
|
94
|
+
get complexity(): number | undefined;
|
|
95
|
+
get basedDefinition(): BoxedBaseDefinition | undefined;
|
|
96
|
+
get symbolDefinition(): BoxedSymbolDefinition | undefined;
|
|
97
|
+
get functionDefinition(): BoxedFunctionDefinition | undefined;
|
|
98
|
+
bind(_scope: RuntimeScope | null): void;
|
|
99
|
+
unbind(): void;
|
|
100
|
+
get keys(): IterableIterator<string> | null;
|
|
101
|
+
get keysCount(): number;
|
|
102
|
+
getKey(_key: string): BoxedExpression | undefined;
|
|
103
|
+
hasKey(_key: string): boolean;
|
|
104
|
+
get value(): BoxedExpression | undefined;
|
|
105
|
+
set value(_value: BoxedExpression | number | undefined);
|
|
106
|
+
get numericValue(): BoxedExpression | undefined;
|
|
107
|
+
isSubdomainOf(_d: BoxedExpression | string): undefined | boolean;
|
|
108
|
+
get domain(): BoxedDomain;
|
|
109
|
+
set domain(_domain: BoxedDomain);
|
|
110
|
+
get explicitDomain(): BoxedDomain | undefined;
|
|
97
111
|
get isNumber(): boolean | undefined;
|
|
98
112
|
get isInteger(): boolean | undefined;
|
|
99
113
|
get isRational(): boolean | undefined;
|
|
@@ -103,18 +117,7 @@ export declare abstract class AbstractBoxedExpression implements BoxedExpression
|
|
|
103
117
|
get isComplex(): boolean | undefined;
|
|
104
118
|
get isImaginary(): boolean | undefined;
|
|
105
119
|
get isExtendedComplex(): boolean | undefined;
|
|
106
|
-
get isOne(): boolean | undefined;
|
|
107
|
-
get isNegativeOne(): boolean | undefined;
|
|
108
|
-
get isEven(): boolean | undefined;
|
|
109
|
-
get isOdd(): boolean | undefined;
|
|
110
|
-
get isPrime(): boolean | undefined;
|
|
111
|
-
get isComposite(): boolean | undefined;
|
|
112
|
-
get canonical(): BoxedExpression;
|
|
113
|
-
apply(_fn: (x: BoxedExpression) => SemiBoxedExpression, _head?: string): BoxedExpression;
|
|
114
|
-
evaluate(options?: EvaluateOptions): BoxedExpression;
|
|
115
120
|
simplify(_options?: SimplifyOptions): BoxedExpression;
|
|
121
|
+
evaluate(options?: EvaluateOptions): BoxedExpression;
|
|
116
122
|
N(_options?: NOptions): BoxedExpression;
|
|
117
|
-
replace(_rules: BoxedRuleSet): null | BoxedExpression;
|
|
118
|
-
subs(_sub: Substitution): BoxedExpression;
|
|
119
|
-
solve(_vars: Iterable<string>): null | BoxedExpression[];
|
|
120
123
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { BoxedExpression, IComputeEngine, EvaluateOptions, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, ReplaceOptions, Substitution, Metadata, PatternMatchOption, BoxedDomain } from '../public';
|
|
3
3
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { BoxedDomain, BoxedExpression, DomainCompatibility, DomainConstructor, DomainExpression, DomainLiteral, IComputeEngine, Metadata, PatternMatchOption, Substitution } from '../public';
|
|
3
3
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare function makeFunctionDefinition(engine: IComputeEngine, def: FunctionDefinition): BoxedFunctionDefinition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { Expression } from '../../math-json/math-json-format';
|
|
3
3
|
import { BoxedExpression, BoxedFunctionDefinition, IComputeEngine, EvaluateOptions, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, Substitution, ReplaceOptions, Metadata, PatternMatchOption, BoxedDomain, BoxedLambdaExpression, RuntimeScope } from '../public';
|
|
4
4
|
/**
|
|
@@ -6,10 +6,10 @@ import { BoxedExpression, BoxedFunctionDefinition, IComputeEngine, EvaluateOptio
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class BoxedFunction extends AbstractBoxedExpression {
|
|
8
8
|
private _scope;
|
|
9
|
-
private _head;
|
|
10
|
-
private _ops;
|
|
9
|
+
private readonly _head;
|
|
10
|
+
private readonly _ops;
|
|
11
|
+
private _canonical;
|
|
11
12
|
private _def;
|
|
12
|
-
private _isCanonical;
|
|
13
13
|
private _isPure;
|
|
14
14
|
/** The domain of the value of the function applied to its arguments */
|
|
15
15
|
private _codomain;
|
|
@@ -19,27 +19,45 @@ export declare class BoxedFunction extends AbstractBoxedExpression {
|
|
|
19
19
|
private _value;
|
|
20
20
|
private _numericValue;
|
|
21
21
|
private _hash;
|
|
22
|
-
constructor(ce: IComputeEngine, head: string | BoxedExpression, ops: BoxedExpression[],
|
|
22
|
+
constructor(ce: IComputeEngine, head: string | BoxedExpression, ops: BoxedExpression[], options?: {
|
|
23
|
+
metadata?: Metadata;
|
|
24
|
+
canonical?: boolean;
|
|
25
|
+
def?: BoxedFunctionDefinition;
|
|
26
|
+
});
|
|
23
27
|
get hash(): number;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
get description(): string[];
|
|
27
|
-
get url(): string;
|
|
28
|
-
get complexity(): number;
|
|
29
|
-
get head(): string | BoxedExpression;
|
|
30
|
-
get value(): BoxedExpression | undefined;
|
|
31
|
-
get numericValue(): BoxedExpression | undefined;
|
|
32
|
-
get isPure(): boolean;
|
|
28
|
+
get isCanonical(): boolean;
|
|
29
|
+
set isCanonical(val: boolean);
|
|
33
30
|
get isLiteral(): boolean;
|
|
34
|
-
get
|
|
31
|
+
get isPure(): boolean;
|
|
32
|
+
get json(): Expression;
|
|
33
|
+
get head(): string | BoxedExpression;
|
|
35
34
|
get ops(): BoxedExpression[];
|
|
36
35
|
get nops(): number;
|
|
37
36
|
get op1(): BoxedExpression;
|
|
38
37
|
get op2(): BoxedExpression;
|
|
39
38
|
get op3(): BoxedExpression;
|
|
39
|
+
get isValid(): boolean;
|
|
40
|
+
get canonical(): BoxedExpression;
|
|
41
|
+
map<T = BoxedExpression>(fn: (x: BoxedExpression) => T): IterableIterator<T>;
|
|
42
|
+
apply(fn: (x: BoxedExpression) => SemiBoxedExpression, head?: string): BoxedExpression;
|
|
43
|
+
subs(sub: Substitution): BoxedExpression;
|
|
44
|
+
replace(rules: BoxedRuleSet, options?: ReplaceOptions): BoxedExpression | null;
|
|
45
|
+
has(x: string | string[]): boolean;
|
|
46
|
+
/** `isSame` is structural/symbolic equality */
|
|
47
|
+
isSame(rhs: BoxedExpression): boolean;
|
|
48
|
+
match(rhs: BoxedExpression, options?: PatternMatchOption): Substitution | null;
|
|
49
|
+
unbind(): void;
|
|
50
|
+
get wikidata(): string | undefined;
|
|
51
|
+
get description(): string[] | undefined;
|
|
52
|
+
get url(): string | undefined;
|
|
53
|
+
get complexity(): number | undefined;
|
|
40
54
|
get functionDefinition(): BoxedFunctionDefinition | undefined;
|
|
41
|
-
bind(
|
|
55
|
+
bind(_scope: RuntimeScope | null): void;
|
|
56
|
+
get value(): BoxedExpression | undefined;
|
|
57
|
+
get numericValue(): BoxedExpression | undefined;
|
|
42
58
|
get domain(): BoxedDomain;
|
|
59
|
+
/** `isEqual` is mathematical equality */
|
|
60
|
+
isEqual(rhs: BoxedExpression): boolean;
|
|
43
61
|
isLess(rhs: BoxedExpression): boolean | undefined;
|
|
44
62
|
isLessEqual(rhs: BoxedExpression): boolean | undefined;
|
|
45
63
|
isGreater(rhs: BoxedExpression): boolean | undefined;
|
|
@@ -60,26 +78,16 @@ export declare class BoxedFunction extends AbstractBoxedExpression {
|
|
|
60
78
|
get isExtendedReal(): boolean | undefined;
|
|
61
79
|
get isComplex(): boolean | undefined;
|
|
62
80
|
get isImaginary(): boolean | undefined;
|
|
63
|
-
get json(): Expression;
|
|
64
|
-
has(x: string | string[]): boolean;
|
|
65
|
-
/** `isSame` is structural/symbolic equality */
|
|
66
|
-
isSame(rhs: BoxedExpression): boolean;
|
|
67
|
-
match(rhs: BoxedExpression, options?: PatternMatchOption): Substitution | null;
|
|
68
|
-
/** `isEqual` is mathematical equality */
|
|
69
|
-
isEqual(rhs: BoxedExpression): boolean;
|
|
70
81
|
get sgn(): -1 | 0 | 1 | undefined | null;
|
|
71
|
-
map<T = BoxedExpression>(fn: (x: BoxedExpression) => T): IterableIterator<T>;
|
|
72
|
-
get isCanonical(): boolean;
|
|
73
|
-
set isCanonical(val: boolean);
|
|
74
|
-
apply(fn: (x: BoxedExpression) => SemiBoxedExpression, head?: string): BoxedExpression;
|
|
75
|
-
get canonical(): BoxedExpression;
|
|
76
82
|
simplify(options?: SimplifyOptions): BoxedExpression;
|
|
77
83
|
evaluate(options?: EvaluateOptions): BoxedExpression;
|
|
78
84
|
N(options?: NOptions): BoxedExpression;
|
|
79
85
|
solve(_vars: Iterable<string>): null | BoxedExpression[];
|
|
80
|
-
replace(rules: BoxedRuleSet, options?: ReplaceOptions): BoxedExpression | null;
|
|
81
|
-
subs(sub: Substitution): BoxedExpression;
|
|
82
86
|
}
|
|
87
|
+
export declare function makeCanonicalFunction(ce: IComputeEngine, head: string | BoxedExpression, ops: BoxedExpression[], options?: {
|
|
88
|
+
[x: string]: any;
|
|
89
|
+
metadata?: Metadata;
|
|
90
|
+
}): BoxedExpression;
|
|
83
91
|
export declare function lambda(ce: IComputeEngine, fn: BoxedLambdaExpression, args: BoxedExpression[]): BoxedExpression;
|
|
84
92
|
/** Apply the function `f` to elements of `xs`, except to the elements
|
|
85
93
|
* described by `skip`:
|
|
@@ -95,4 +103,3 @@ export declare function lambda(ce: IComputeEngine, fn: BoxedLambdaExpression, ar
|
|
|
95
103
|
* If `f` returns `null`, the element is not added to the result
|
|
96
104
|
*/
|
|
97
105
|
export declare function holdMap(head: string, xs: BoxedExpression[], skip: 'all' | 'none' | 'first' | 'rest' | 'last' | 'most', associative: boolean, f: (x: BoxedExpression) => BoxedExpression | null): BoxedExpression[];
|
|
98
|
-
export declare function canonicalHoldMap(head: string, xs: BoxedExpression[], skip: 'all' | 'none' | 'first' | 'rest' | 'last' | 'most', associative: boolean): BoxedExpression[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { Complex } from 'complex.js';
|
|
3
3
|
import { Expression } from '../../math-json/math-json-format';
|
|
4
4
|
import { BoxedExpression, BoxedDomain, IComputeEngine, Metadata, NOptions, PatternMatchOption, SimplifyOptions, Substitution } from '../public';
|
|
@@ -26,7 +26,9 @@ export declare class BoxedNumber extends AbstractBoxedExpression {
|
|
|
26
26
|
get isLiteral(): boolean;
|
|
27
27
|
get isCanonical(): boolean;
|
|
28
28
|
set isCanonical(val: boolean);
|
|
29
|
-
get
|
|
29
|
+
get complexity(): number;
|
|
30
|
+
get value(): BoxedExpression;
|
|
31
|
+
get numericValue(): BoxedExpression;
|
|
30
32
|
get machineValue(): number | null;
|
|
31
33
|
get decimalValue(): Decimal | null;
|
|
32
34
|
get complexValue(): Complex | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
3
3
|
import { BoxedExpression, BoxedSubstitution, BoxedDomain, IComputeEngine, LatexString, Metadata, Pattern, PatternMatchOption, SemiBoxedExpression, Substitution } from '../public';
|
|
4
4
|
export declare class BoxedPattern extends AbstractBoxedExpression implements Pattern {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare function domainToFlags(dom: BoxedDomain | undefined | null): Partial<SymbolFlags>;
|
|
3
3
|
export declare class BoxedSymbolDefinitionImpl implements BoxedSymbolDefinition {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
private _def;
|
|
6
|
+
private _value;
|
|
7
|
+
private _domain;
|
|
8
|
+
private _inferedDomain;
|
|
4
9
|
private _engine;
|
|
5
10
|
readonly scope: RuntimeScope | undefined;
|
|
6
|
-
private _value;
|
|
7
|
-
readonly name: string;
|
|
8
11
|
wikidata?: string;
|
|
9
12
|
description?: string | string[];
|
|
10
|
-
private _domain;
|
|
11
|
-
private _inferedDomain;
|
|
12
13
|
private _number;
|
|
13
14
|
private _integer;
|
|
14
15
|
private _rational;
|
|
@@ -37,7 +38,6 @@ export declare class BoxedSymbolDefinitionImpl implements BoxedSymbolDefinition
|
|
|
37
38
|
at?: (index: string | number) => undefined | BoxedExpression;
|
|
38
39
|
readonly constant: boolean;
|
|
39
40
|
readonly hold: boolean;
|
|
40
|
-
private _def;
|
|
41
41
|
prototype?: BoxedFunctionDefinition;
|
|
42
42
|
self?: unknown;
|
|
43
43
|
constructor(ce: IComputeEngine, def: SymbolDefinition);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
3
3
|
import { BoxedExpression, BoxedRuleSet, BoxedSymbolDefinition, IComputeEngine, EvaluateOptions, NOptions, ReplaceOptions, SimplifyOptions, Substitution, Metadata, PatternMatchOption, BoxedDomain, RuntimeScope, BoxedFunctionDefinition, BoxedBaseDefinition } from '../public';
|
|
4
4
|
/**
|
|
@@ -29,9 +29,9 @@ export declare class BoxedSymbol extends AbstractBoxedExpression {
|
|
|
29
29
|
get isCanonical(): boolean;
|
|
30
30
|
set isCanonical(_va: boolean);
|
|
31
31
|
get canonical(): BoxedExpression;
|
|
32
|
-
get wikidata(): string;
|
|
33
|
-
get description(): string[];
|
|
34
|
-
get url(): string;
|
|
32
|
+
get wikidata(): string | undefined;
|
|
33
|
+
get description(): string[] | undefined;
|
|
34
|
+
get url(): string | undefined;
|
|
35
35
|
get complexity(): number;
|
|
36
36
|
get head(): string;
|
|
37
37
|
get symbol(): string;
|
|
@@ -41,12 +41,12 @@ export declare class BoxedSymbol extends AbstractBoxedExpression {
|
|
|
41
41
|
get symbolDefinition(): BoxedSymbolDefinition | undefined;
|
|
42
42
|
get functionDefinition(): BoxedFunctionDefinition | undefined;
|
|
43
43
|
bind(scope: RuntimeScope | null): void;
|
|
44
|
-
get value(): BoxedExpression
|
|
44
|
+
get value(): BoxedExpression;
|
|
45
45
|
set value(value: BoxedExpression | number | undefined);
|
|
46
46
|
get numericValue(): BoxedExpression | undefined;
|
|
47
47
|
get domain(): BoxedDomain;
|
|
48
48
|
set domain(d: BoxedDomain);
|
|
49
|
-
get explicitDomain(): BoxedDomain |
|
|
49
|
+
get explicitDomain(): BoxedDomain | undefined;
|
|
50
50
|
get json(): Expression;
|
|
51
51
|
get sgn(): -1 | 0 | 1 | undefined | null;
|
|
52
52
|
has(x: string | string[]): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { Expression } from '../../math-json/math-json-format';
|
|
3
3
|
import { BoxedExpression, IComputeEngine } from '../public';
|
|
4
4
|
export declare function isLatexString(s: unknown): s is string;
|
|
@@ -25,8 +25,8 @@ export declare function getSubexpressions(expr: BoxedExpression, head: string):
|
|
|
25
25
|
* if `preferDecimal` is false, create them as machine number
|
|
26
26
|
*/
|
|
27
27
|
export declare function preferDecimal(ce: IComputeEngine): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* return `NaN` if `
|
|
28
|
+
/** When result of a numeric evaluation is a complex number,
|
|
29
|
+
* return `NaN` if not `complexallowed()`
|
|
30
30
|
*/
|
|
31
31
|
export declare function complexAllowed(ce: IComputeEngine): boolean;
|
|
32
32
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
import { Complex } from 'complex.js';
|
|
3
3
|
import { Expression, MathJsonNumber } from '../math-json/math-json-format';
|
|
4
4
|
import { SignalMessage, WarningSignal } from '../common/signals';
|
|
5
5
|
import type { LibraryCategory, LatexDictionary, LatexDictionaryEntry, LatexString, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
|
|
6
6
|
import { AssumeResult, BoxedExpression, BoxedFunctionDefinition, BoxedSymbolDefinition, IComputeEngine, SymbolTable, ExpressionMapInterface, NumericMode as NumericMode, Pattern, RuntimeScope, Scope, SemiBoxedExpression, Substitution, SymbolDefinition, BoxedRuleSet, Rule, JsonSerializationOptions, ComputeEngineStats, Metadata, BoxedDomain, DomainExpression, BoxedLambdaExpression, FunctionDefinition } from './public';
|
|
7
|
-
import { BoxedFunction } from './boxed-expression/boxed-function';
|
|
8
7
|
/**
|
|
9
8
|
*
|
|
10
9
|
* To use the CortexJS Compute Engine, create a `ComputeEngine` instance.
|
|
@@ -284,7 +283,7 @@ export declare class ComputeEngine implements IComputeEngine {
|
|
|
284
283
|
box(expr: Decimal | Complex | [num: number, denom: number] | SemiBoxedExpression): BoxedExpression;
|
|
285
284
|
fn(head: string, ops: BoxedExpression[], metadata?: Metadata): BoxedExpression;
|
|
286
285
|
/** @internal */
|
|
287
|
-
_fn(head: string | BoxedExpression, ops: BoxedExpression[], metadata?: Metadata):
|
|
286
|
+
_fn(head: string | BoxedExpression, ops: BoxedExpression[], metadata?: Metadata): BoxedExpression;
|
|
288
287
|
error(message: ['invalid-domain', ...SemiBoxedExpression[]], where?: SemiBoxedExpression): BoxedDomain;
|
|
289
288
|
error(message: string | [string, ...SemiBoxedExpression[]], where?: SemiBoxedExpression): BoxedExpression;
|
|
290
289
|
add(ops: BoxedExpression[], metadata?: Metadata): BoxedExpression;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_ALGEBRA: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_ARITHMETIC: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_CALCULUS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_CORE: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_INEQUALITIES: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_LOGIC: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_OTHERS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_SETS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_SYMBOLS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.8.0 */
|
|
2
2
|
export declare const DEFINITIONS_TRIGONOMETRY: LatexDictionary;
|