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

Function pairSetEqual

test/compute-engine/diophantine.test.ts:392–398  ·  view source on GitHub ↗
(a: [bigint, bigint][], b: [bigint, bigint][])

Source from the content-addressed store, hash-verified

390}
391
392function pairSetEqual(a: [bigint, bigint][], b: [bigint, bigint][]): boolean {
393 const as = new Set(dedupePairsLocal(a).map(pairKey));
394 const bs = new Set(dedupePairsLocal(b).map(pairKey));
395 if (as.size !== bs.size) return false;
396 for (const k of as) if (!bs.has(k)) return false;
397 return true;
398}
399
400/**
401 * Applies the family-generation rule documented on `PellResult`: every class

Callers 3

Calls 3

dedupePairsLocalFunction · 0.85
mapMethod · 0.65
hasMethod · 0.65

Tested by

no test coverage detected