AngouriMath

Navigation

← Back to list of members

LinearChildren​(AngouriMath.​Entity)

 Method (no overloads)

Summary

Gathers linear children of a sum, e.g.
1 + (x - a/2) + b - 4

would return
{ 1, x, (-1) * a / 2, b, (-1) * 4 }

Remarks

Cached on the node it is asked of, since a node is immutable and the flattening
is asked for many times over: every rule that reads a sum as a list reads it
again for each candidate. A nested sum's list is built from its parts' lists,
which are cached on those parts, so the memory is linear in the tree and no
enumeration is repeated. https://github.com/asc-community/AngouriMath/issues/224

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4405 pages online