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

Function getLeafCount

src/compute-engine/boxed-expression/order.ts:541–544  ·  view source on GitHub ↗

Get the number of atomic elements in the expression

(expr: Expression)

Source from the content-addressed store, hash-verified

539 if (def.operator.commutativeOrder)
540 return [...xs].sort(def.operator.commutativeOrder);
541
542 return [...xs].sort(order);
543}
544
545/**
546 * Sort the terms of a polynomial expression (`Add` expression) according
547 * to the deglex polynomial ordering

Callers 1

orderFunction · 0.85

Calls 1

isFunctionFunction · 0.90

Tested by

no test coverage detected