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

Function fillArray

src/compute-engine/library/collections.ts:2023–2040  ·  view source on GitHub ↗
(
        dims: number[],
        index: number[],
        level = 0
      )

Source from the content-addressed store, hash-verified

2021 value: Expression | undefined
2022): 'undecided' | undefined {
2023 if (value === undefined) return undefined;
2024 if (holdsConditionalValue(value)) return 'undecided';
2025 return undefined;
2026}
2027
2028/**
2029 * The 1-based index of `value` in an UNBOUNDED `Range` on an integer grid
2030 * (`Range(1, +oo)`, `Range(0, -oo, -2)`), computed from the grid rather than
2031 * walked, or `undefined` when this shortcut does not apply.
2032 *
2033 * The walk of an unbounded source is capped at `ce.iterationLimit` elements
2034 * (`searchIndex`), so `IndexOf(Range(1, +oo), 2000)` would stay symbolic
2035 * where it answered `2000` by walking before the cap. The shortcut is limited
2036 * to integer bounds and an integer NUMBER LITERAL in the safe-integer range,
2037 * so its answer is the one a walk comparing with `isSame` gives: a float grid
2038 * has rounding (`Range(0, 1, 0.1)` holds `0.30000000000000004`, not `0.3`), an
2039 * expression whose real part is an integer (`Sqrt(9)`) is not the same as
2040 * the element `3`, an integer past 2^53 rounds when read as a double, and a
2041 * finite range is short enough to walk.
2042 */
2043function unboundedIntegerRangeIndex(

Callers 1

collections.tsFile · 0.85

Calls 3

fnFunction · 0.85
mapMethod · 0.65
numberMethod · 0.65

Tested by

no test coverage detected