AngouriMath

Navigation

← Back to list of members

constructors

 Field

Summary

Every node type this builds, with its arity and the constructor call that builds it.
One table, and the only place any of these three facts is written.

Remarks

Constructor calls written out rather than reflected, for the reason
Construct(System.Type,AngouriMath.Entity[]) gives. A table rather than a chain of
nodeType == typeof(T) tests because the chain was walked on every node built
during matching and grew linearly with this list: at fourteen types that was cheap,
and this list is longer than that. The lambdas are non-capturing, so each is a single
cached delegate rather than an allocation per call.
BuildableNodeTypes and NodeTypeNamed(System.String) are both derived from
this table's keys, so there is no second list to drift from it — EGraph used to keep one, and a type added here and not there silently stopped being reachable
from the e-graph with no compiler error.

























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