@cortex-js/compute-engine 0.23.0 → 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.
Files changed (108) hide show
  1. package/README.md +2 -2
  2. package/dist/compute-engine.esm.js +13001 -12744
  3. package/dist/compute-engine.js +13001 -12744
  4. package/dist/compute-engine.min.esm.js +10 -10
  5. package/dist/compute-engine.min.js +10 -10
  6. package/dist/math-json.esm.js +2 -2
  7. package/dist/math-json.js +2 -2
  8. package/dist/math-json.min.esm.js +2 -2
  9. package/dist/math-json.min.js +2 -2
  10. package/dist/types/common/ansi-codes.d.ts +1 -1
  11. package/dist/types/common/grapheme-splitter.d.ts +1 -1
  12. package/dist/types/common/signals.d.ts +12 -1
  13. package/dist/types/common/utils.d.ts +1 -1
  14. package/dist/types/compute-engine/assume.d.ts +1 -1
  15. package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +4 -4
  16. package/dist/types/compute-engine/boxed-expression/box.d.ts +2 -2
  17. package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +8 -4
  18. package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +6 -3
  19. package/dist/types/compute-engine/boxed-expression/boxed-function-definition.d.ts +1 -1
  20. package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +8 -4
  21. package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +5 -3
  22. package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +17 -22
  23. package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +7 -3
  24. package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +2 -2
  25. package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +7 -4
  26. package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +7 -3
  27. package/dist/types/compute-engine/boxed-expression/canonical.d.ts +1 -1
  28. package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
  29. package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
  30. package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
  31. package/dist/types/compute-engine/boxed-expression/utils.d.ts +2 -9
  32. package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
  33. package/dist/types/compute-engine/collection-utils.d.ts +1 -1
  34. package/dist/types/compute-engine/compile.d.ts +1 -1
  35. package/dist/types/compute-engine/compute-engine.d.ts +39 -23
  36. package/dist/types/compute-engine/cost-function.d.ts +1 -1
  37. package/dist/types/compute-engine/domain-utils.d.ts +1 -1
  38. package/dist/types/compute-engine/function-utils.d.ts +4 -4
  39. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
  40. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
  41. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
  42. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-complex.d.ts +1 -1
  43. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
  44. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-linear-algebra.d.ts +1 -1
  45. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
  46. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
  47. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-relational-operators.d.ts +1 -1
  48. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
  49. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-statistics.d.ts +1 -1
  50. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
  51. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
  52. package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
  53. package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +1 -1
  54. package/dist/types/compute-engine/latex-syntax/parse-identifier.d.ts +1 -1
  55. package/dist/types/compute-engine/latex-syntax/parse.d.ts +5 -3
  56. package/dist/types/compute-engine/latex-syntax/public.d.ts +154 -18
  57. package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
  58. package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +2 -2
  59. package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
  60. package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
  61. package/dist/types/compute-engine/library/arithmetic-add.d.ts +1 -1
  62. package/dist/types/compute-engine/library/arithmetic-divide.d.ts +1 -1
  63. package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +1 -1
  64. package/dist/types/compute-engine/library/arithmetic-power.d.ts +1 -1
  65. package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
  66. package/dist/types/compute-engine/library/calculus.d.ts +1 -1
  67. package/dist/types/compute-engine/library/collections.d.ts +1 -1
  68. package/dist/types/compute-engine/library/complex.d.ts +1 -1
  69. package/dist/types/compute-engine/library/control-structures.d.ts +1 -1
  70. package/dist/types/compute-engine/library/core.d.ts +1 -1
  71. package/dist/types/compute-engine/library/domains.d.ts +1 -1
  72. package/dist/types/compute-engine/library/library.d.ts +1 -1
  73. package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
  74. package/dist/types/compute-engine/library/logic.d.ts +1 -1
  75. package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
  76. package/dist/types/compute-engine/library/random-expression.d.ts +1 -1
  77. package/dist/types/compute-engine/library/relational-operator.d.ts +2 -1
  78. package/dist/types/compute-engine/library/sets.d.ts +1 -1
  79. package/dist/types/compute-engine/library/statistics.d.ts +1 -1
  80. package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
  81. package/dist/types/compute-engine/library/utils.d.ts +1 -1
  82. package/dist/types/compute-engine/numerics/factor.d.ts +1 -1
  83. package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +2 -2
  84. package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
  85. package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
  86. package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
  87. package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
  88. package/dist/types/compute-engine/numerics/rationals.d.ts +1 -1
  89. package/dist/types/compute-engine/numerics/richardson.d.ts +1 -1
  90. package/dist/types/compute-engine/numerics/terms.d.ts +1 -1
  91. package/dist/types/compute-engine/public.d.ts +156 -54
  92. package/dist/types/compute-engine/rules.d.ts +2 -2
  93. package/dist/types/compute-engine/simplify-rules.d.ts +1 -1
  94. package/dist/types/compute-engine/solve.d.ts +1 -1
  95. package/dist/types/compute-engine/symbolic/derivative.d.ts +1 -1
  96. package/dist/types/compute-engine/symbolic/expand.d.ts +1 -1
  97. package/dist/types/compute-engine/symbolic/flatten.d.ts +1 -1
  98. package/dist/types/compute-engine/symbolic/negate.d.ts +1 -1
  99. package/dist/types/compute-engine/symbolic/polynomials.d.ts +1 -1
  100. package/dist/types/compute-engine/symbolic/product.d.ts +1 -1
  101. package/dist/types/compute-engine/symbolic/tensor-fields.d.ts +1 -1
  102. package/dist/types/compute-engine/symbolic/tensors.d.ts +4 -1
  103. package/dist/types/compute-engine/symbolic/utils.d.ts +1 -1
  104. package/dist/types/compute-engine.d.ts +2 -2
  105. package/dist/types/math-json/math-json-format.d.ts +10 -1
  106. package/dist/types/math-json/utils.d.ts +1 -1
  107. package/dist/types/math-json.d.ts +2 -2
  108. package/package.json +8 -3
@@ -1,18 +1,28 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { Decimal } from 'decimal.js';
3
3
  import { Expression, MathJsonNumber } from '../math-json/math-json-format';
4
4
  import type { LibraryCategory, LatexDictionaryEntry, LatexString, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
5
- import { AssumeResult, BoxedExpression, BoxedFunctionDefinition, BoxedSymbolDefinition, IComputeEngine, IdentifierDefinitions, ExpressionMapInterface, NumericMode, Pattern, RuntimeScope, Scope, SemiBoxedExpression, SymbolDefinition, BoxedRuleSet, Rule, JsonSerializationOptions, ComputeEngineStats, Metadata, BoxedDomain, DomainExpression, FunctionDefinition, Rational, BoxedSubstitution, AssignValue, DomainLiteral, ArrayValue, CanonicalForm } from './public';
5
+ import { AssumeResult, BoxedExpression, BoxedFunctionDefinition, BoxedSymbolDefinition, IComputeEngine, IdentifierDefinitions, ExpressionMapInterface, NumericMode, RuntimeScope, Scope, SemiBoxedExpression, SymbolDefinition, BoxedRuleSet, Rule, JsonSerializationOptions, ComputeEngineStats, Metadata, BoxedDomain, DomainExpression, FunctionDefinition, Rational, BoxedSubstitution, AssignValue, DomainLiteral, ArrayValue, CanonicalForm } from './public';
6
6
  /**
7
7
  *
8
- * To use the CortexJS Compute Engine, create a `ComputeEngine` instance, or if using a
9
- * mathfield, use the default Compute Engine instance from the `MathfieldElement` class: `ce = MathfieldElement.computeEngine`.
8
+ * To use the Compute Engine, create a `ComputeEngine` instance:
10
9
  *
11
- * Use the instance to create boxed expressions with `ce.parse()` and `ce.box()`.
10
+ * ```js
11
+ * ce = new ComputeEngine();
12
+ * ```
12
13
  *
14
+ * If using a mathfield, use the default Compute Engine instance from the
15
+ * `MathfieldElement` class:
16
+ *
17
+ * ```js
18
+ * ce = MathfieldElement.computeEngine
19
+ * ```
13
20
  *
14
- * ```ts
21
+ * Use the instance to create boxed expressions with `ce.parse()` and `ce.box()`.
22
+ *
23
+ * ```js
15
24
  * const ce = new ComputeEngine();
25
+ *
16
26
  * let expr = ce.parse("e^{i\\pi}");
17
27
  * console.log(expr.N().latex);
18
28
  * // ➔ "-1"
@@ -21,6 +31,9 @@ import { AssumeResult, BoxedExpression, BoxedFunctionDefinition, BoxedSymbolDefi
21
31
  * console.log(expr.evaluate().latex);
22
32
  * // ➔ "a^2 + 2ab + b^2"
23
33
  * ```
34
+ *
35
+ * @category Compute Engine
36
+ *
24
37
  */
25
38
  export declare class ComputeEngine implements IComputeEngine {
26
39
  readonly Anything: BoxedDomain;
@@ -103,6 +116,8 @@ export declare class ComputeEngine implements IComputeEngine {
103
116
  /** In strict mode (the default) the Compute Engine performs
104
117
  * validation of domains and signature and may report errors.
105
118
  *
119
+ * These checks may impact performance
120
+ *
106
121
  * When strict mode is off, results may be incorrect or generate JavaScript
107
122
  * errors if the input is not valid.
108
123
  *
@@ -168,9 +183,11 @@ export declare class ComputeEngine implements IComputeEngine {
168
183
  _register(_expr: BoxedExpression): void;
169
184
  /** @internal */
170
185
  _unregister(_expr: BoxedExpression): void;
186
+ /** @internal */
171
187
  get stats(): ComputeEngineStats;
172
188
  /** @internal */
173
189
  _bignum: Decimal.Constructor;
190
+ get precision(): number;
174
191
  /** The precision, or number of significant digits, of numeric
175
192
  * calculations when the numeric mode is `"auto"` or `"bignum"`.
176
193
  *
@@ -182,9 +199,9 @@ export declare class ComputeEngine implements IComputeEngine {
182
199
  * Trigonometric operations are accurate for precision up to 1,000.
183
200
  *
184
201
  */
185
- get precision(): number;
186
202
  set precision(p: number | 'machine');
187
203
  get numericMode(): NumericMode;
204
+ /** {@inheritDoc NumericMode} */
188
205
  set numericMode(f: NumericMode);
189
206
  /** @experimental */
190
207
  get timeLimit(): number;
@@ -192,16 +209,16 @@ export declare class ComputeEngine implements IComputeEngine {
192
209
  get iterationLimit(): number;
193
210
  /** @experimental */
194
211
  get recursionLimit(): number;
212
+ get tolerance(): number;
195
213
  /**
196
214
  * Values smaller than the tolerance are considered to be zero for the
197
215
  * purpose of comparison, i.e. if `|b - a| <= tolerance`, `b` is considered
198
216
  * equal to `a`.
199
217
  */
200
- get tolerance(): number;
201
218
  set tolerance(val: number);
202
219
  /** Replace a number that is close to 0 with the exact integer 0.
203
220
  *
204
- * How close to 0 the number has to be to be considered 0 is determined by {@link tolerance}.
221
+ * How close to 0 the number has to be to be considered 0 is determined by {@linkcode tolerance}.
205
222
  */
206
223
  chop(n: number): number;
207
224
  chop(n: Decimal): Decimal | 0;
@@ -305,10 +322,14 @@ export declare class ComputeEngine implements IComputeEngine {
305
322
  complex(a: number | Decimal | Complex, b?: number | Decimal): Complex;
306
323
  isBignum(a: unknown): a is Decimal;
307
324
  isComplex(a: unknown): a is Complex;
325
+ /** @internal */
308
326
  private get latexSyntax();
309
327
  static getLatexDictionary(domain?: LibraryCategory | 'all'): readonly Readonly<object>[];
310
- set costFunction(fn: ((expr: BoxedExpression) => number) | undefined);
328
+ /**
329
+ * The cost function is used to determine the "cost" of an expression. For example, when simplifying an expression, the simplification that results in the lowest cost is chosen.
330
+ */
311
331
  get costFunction(): (expr: BoxedExpression) => number;
332
+ set costFunction(fn: ((expr: BoxedExpression) => number) | undefined);
312
333
  /**
313
334
  * Return a matching symbol definition, starting with the current
314
335
  * scope and going up the scope chain. Prioritize finding a match by
@@ -432,9 +453,10 @@ export declare class ComputeEngine implements IComputeEngine {
432
453
  checkContinueExecution(): void;
433
454
  /** @internal */
434
455
  cache<T>(cacheName: string, build: () => T, purge: (T: any) => T | undefined): T;
456
+ /** Return a canonical version of an array of semi-boxed-expressions. */
435
457
  canonical(xs: SemiBoxedExpression[]): BoxedExpression[];
436
- /**
437
- * Return a boxed expression from the input.
458
+ /** Return a boxed expression from a number, string or semiboxed expression.
459
+ * Calls `function()`, `number()` or `symbol()` as appropriate.
438
460
  */
439
461
  box(expr: Decimal | Complex | [num: number, denom: number] | SemiBoxedExpression, options?: {
440
462
  canonical?: boolean | CanonicalForm | CanonicalForm[];
@@ -530,7 +552,6 @@ export declare class ComputeEngine implements IComputeEngine {
530
552
  metadata?: Metadata;
531
553
  }): BoxedExpression;
532
554
  rules(rules: Rule[]): BoxedRuleSet;
533
- pattern(expr: LatexString | SemiBoxedExpression): Pattern;
534
555
  /**
535
556
  * Return a function expression, but the caller is responsible for making
536
557
  * sure that the arguments are canonical.
@@ -558,19 +579,16 @@ export declare class ComputeEngine implements IComputeEngine {
558
579
  serialize(x: Expression | BoxedExpression, options?: {
559
580
  canonical?: boolean;
560
581
  }): string;
582
+ get latexOptions(): NumberFormattingOptions & ParseLatexOptions & SerializeLatexOptions;
561
583
  /**
562
584
  * Options to control the serialization of MathJSON expression to LaTeX
563
- * when using `this.latex` or `this.engine.serialize()`.
564
- *
565
- *
566
- * {@inheritDoc NumberFormattingOptions}
567
- * {@inheritDoc ParseLatexOptions}
568
- * {@inheritDoc SerializeLatexOptions}
585
+ * when using `expr.latex` or `ce.serialize()`.
569
586
  *
570
587
  */
571
- get latexOptions(): NumberFormattingOptions & ParseLatexOptions & SerializeLatexOptions;
588
+ /** {@inheritDoc NumberFormattingOptions} */
589
+ /** {@inheritDoc ParseLatexOptions} */
590
+ /** {@inheritDoc SerializeLatexOptions} */
572
591
  set latexOptions(opts: Partial<NumberFormattingOptions> & Partial<ParseLatexOptions> & Partial<SerializeLatexOptions>);
573
- /** {@inheritDoc JsonSerializationOptions} */
574
592
  get jsonSerializationOptions(): Readonly<JsonSerializationOptions>;
575
593
  set jsonSerializationOptions(val: Partial<JsonSerializationOptions>);
576
594
  rawJson(expr: BoxedExpression): Expression;
@@ -594,8 +612,6 @@ export declare class ComputeEngine implements IComputeEngine {
594
612
  *
595
613
  * Note that the assumption is put into canonical form before being added.
596
614
  *
597
- * @param symbol - The symbol to make an assumption about
598
- *
599
615
  * Returns:
600
616
  * - `contradiction` if the new assumption is incompatible with previous
601
617
  * ones.
@@ -1,3 +1,3 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare function costFunction(expr: BoxedExpression): number;
3
3
  export declare const DEFAULT_COST_FUNCTION: typeof costFunction;
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { Decimal } from 'decimal.js';
3
3
  import { BoxedDomain, BoxedFunctionSignature, DomainLiteral, FunctionSignature, IComputeEngine, Rational } from './public';
4
4
  /**
@@ -1,6 +1,6 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  /***
3
- * ## THEORY OF OPERATIONS
3
+ * ### THEORY OF OPERATIONS
4
4
  *
5
5
  * A `["Function"]` expression has its own scope.
6
6
  * This scope includes the parameters and local variables.
@@ -15,7 +15,7 @@
15
15
  * be a number, a symbol or (more commonly) an function expression.
16
16
  *
17
17
  *
18
- * ### DURING BOXING (in makeLambda())
18
+ * #### DURING BOXING (in makeLambda())
19
19
  *
20
20
  * During the boxing/canonicalization phase of a function
21
21
  * (`["Function"]` expression or head expression):
@@ -28,7 +28,7 @@
28
28
  * is associated with the function
29
29
  *
30
30
  *
31
- * ### DURING EVALUATION (executing the result of makeLambda())
31
+ * #### DURING EVALUATION (executing the result of makeLambda())
32
32
  *
33
33
  * 1/ The arguments are evaluated in the current scope
34
34
  * 2/ The context is swapped to the function scope
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_ALGEBRA: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_ARITHMETIC: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_CALCULUS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_COMPLEX: LatexDictionary;
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_CORE: LatexDictionary;
3
3
  export declare const DELIMITERS_SHORTHAND: {
4
4
  '(': string;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_LOGIC: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_OTHERS: LatexDictionary;
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { LatexDictionaryEntry } from '../public';
3
3
  export declare const DEFINITIONS_INEQUALITIES: LatexDictionaryEntry[];
4
4
  export declare function isRelationalOperator(name: BoxedExpression | string): boolean;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_SETS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_STATISTICS: LatexDictionary;
@@ -1,3 +1,3 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const SYMBOLS: [string, string, number][];
3
3
  export declare const DEFINITIONS_SYMBOLS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  export declare const DEFINITIONS_TRIGONOMETRY: LatexDictionary;
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { WarningSignal } from '../../../common/signals';
3
3
  export type CommonEntry = {
4
4
  /** Note: a name is required if a serialize handler is provided */
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { Serializer } from './serializer';
3
3
  import { Expression } from '../../math-json/math-json-format';
4
4
  import { WarningSignalHandler } from '../../common/signals';
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { Parser } from './public';
3
3
  /** For error handling, if we have a identifier prefix, assume
4
4
  * the identifier is invalid (it would have been captured by
@@ -1,4 +1,4 @@
1
- /* 0.23.0 */
1
+ /* 0.24.0 */
2
2
  import { IndexedLatexDictionary, IndexedLatexDictionaryEntry, IndexedInfixEntry, IndexedPostfixEntry, IndexedPrefixEntry, IndexedSymbolEntry, IndexedExpressionEntry, IndexedFunctionEntry } from './dictionary/definitions';
3
3
  import { IComputeEngine } from '../public';
4
4
  import { Expression } from '../../math-json/math-json-format';
@@ -7,7 +7,9 @@ export declare const DEFAULT_PARSE_LATEX_OPTIONS: ParseLatexOptions;
7
7
  export declare class _Parser implements Parser {
8
8
  readonly computeEngine: IComputeEngine;
9
9
  readonly options: NumberFormattingOptions & ParseLatexOptions;
10
- index: number;
10
+ _index: number;
11
+ get index(): number;
12
+ set index(val: number);
11
13
  private _tokens;
12
14
  private _positiveInfinityTokens;
13
15
  private _negativeInfinityTokens;
@@ -135,7 +137,7 @@ export declare class _Parser implements Parser {
135
137
  * Parse a number, with an optional sign, exponent, decimal marker,
136
138
  * repeating decimals, etc...
137
139
  */
138
- private parseNumber;
140
+ parseNumber(): Expression | null;
139
141
  /**
140
142
  * A Latex number can be a decimal, hex or octal number.
141
143
  * It is used in some Latex commands, such as `\char`