AngouriMath
SimplificationAtLevel
Method with 2 overloads
SimplificationAtLevel(System.Int32,AngouriMath.Core.CostModel)
Summary
The full simplification pipeline at a chosen level, rating candidates by
costModel instead of ComplexityCriteria.
Parameter "level"
How hard to look; the same argument Simplify(System.Int32) takes.
Parameter "costModel"
Which candidate counts as cheapest. Default here behaves
exactly like SimplificationAtLevel(System.Int32) — passing it is how a caller
states that on purpose rather than by leaving a parameter out.
Remarks
#746 tier 2 named
this remaining on its own row: "a cost model that reaches an API rather than an ambient
setting". ComplexityCriteria already is an API in
the sense that a caller can scope it explicitly and safely — it is backed by the same
Setting`1Budget uses, async-local rather
than thread-static, so one caller's override cannot leak into another's concurrent call.
What it lacked was a place in this API, the addressable one Transformation is: composingSimplificationAtLevel(2, costModel).Then(...) names the choice
where setting an ambient value around a call does not. This overload does not
reimplement candidate search against an explicit parameter threaded through
Simplificator -- that would be a second pipeline to keep in step with the one
Simplify(System.Int32) actually runs. It scopes the existing, already-tested
setting for the duration of this one call instead of introducing a second pipeline.
SimplificationAtLevel(System.Int32)
Summary
The full simplification pipeline at a chosen level.
Parameter "level"
How hard to look; the same argument Simplify(System.Int32) takes.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4405 pages online