MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / extractIndexVariable

Function extractIndexVariable

src/compute-engine/sequence.ts:674–694  ·  view source on GitHub ↗
(
  subscript: Expression
)

Source from the content-addressed store, hash-verified

672
673 // The index keys of the terms whose constraint check is in progress.
674 const constraintChecks = new Set<string>();
675
676 // The cold reads in progress, by the key of `readKeyOf()`. A read of a
677 // term inside one of them (the recurrence of a term reads a lower term)
678 // is served by it: see `termAt()`.
679 const reads = new Map<string, SequenceRead>();
680
681 /**
682 * The key of a cold read: the kind of evaluation (`E` for `evaluate()`,
683 * `N` for `.N()`), the precision, and whether the assumptions are
684 * hidden. A read of a term with the same key gives the same term.
685 */
686 const readKeyOf = (
687 engine: ComputeEngine,
688 numericApproximation: boolean | undefined
689 ): string =>
690 `${engine._factsHidden() ? 'facts-hidden|' : ''}${
691 numericApproximation ? 'N' : 'E'
692 }${precisionKeyOf(engine)}`;
693
694 const indexKeyOf = (indices: number[]): string => indices.join(',');
695
696 // The offsets `c` of the lower terms `name_{n−c}` that the recurrence
697 // always reads (see `lowerTermOffsets()`). `null` before the analysis.

Callers 1

core.tsFile · 0.90

Calls 1

isSymbolFunction · 0.90

Tested by

no test coverage detected