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

Function lexicographicOrder

src/compute-engine/boxed-expression/order.ts:504–511  ·  view source on GitHub ↗
(
  expr: Expression,
  vars?: ReadonlyArray<string>
)

Source from the content-addressed store, hash-verified

502
503 if (rankA === 'multiply') {
504 const totalDegreeA = totalDegree(a);
505 const totalDegreeB = totalDegree(b);
506 if (totalDegreeA !== totalDegreeB) return totalDegreeB - totalDegreeA;
507 const maxDegreeA = maxDegree(a);
508 const maxDegreeB = maxDegree(b);
509 if (maxDegreeA !== maxDegreeB) return maxDegreeA - maxDegreeB;
510
511 if (!isFunction(a) || !isFunction(b)) return 0;
512 const aOps = a.ops;
513 const bOps = b.ops;
514

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected