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

Function takeCount

src/compute-engine/library/collections.ts:3214–3222  ·  view source on GitHub ↗
(expr: Expression)

Source from the content-addressed store, hash-verified

3212 isEmpty: (_expr) => {
3213 const int = interval(_expr);
3214 // Symbolic endpoints: emptiness is indeterminate
3215 if (!int) return undefined;
3216 // Bounds that cross contain nothing, whatever the endpoint markers
3217 // say: `(2, 1)` and `[2, 1]` are both empty. The previous form
3218 // answered this case from the marker pair alone and reported a
3219 // doubly-open reversed interval NON-empty.
3220 if (int.start > int.end) return true;
3221 // Bounds that coincide contain their single point only when BOTH
3222 // endpoints are closed: `[1, 1]` is {1} — and `contains(1)` says so —
3223 // while `(1, 1)`, `[1, 1)` and `(1, 1]` all exclude the only
3224 // candidate. The previous form reported `[1, 1]` empty, contradicting
3225 // its own `contains` handler.

Callers 1

collections.tsFile · 0.85

Calls 3

isFunctionFunction · 0.90
toIntegerFunction · 0.90
isFiniteMethod · 0.45

Tested by

no test coverage detected