AngouriMath
Budget
Property
Summary
What an algorithm that can run away is allowed to spend before it declines.
Remarks
Unlimited. Unset, each algorithm keeps the budget
it chose for itself -- the Gröbner path bounds itself by five seconds and
by five structural ceilings, and did so before this setting existed. Set, this
replaces those defaults wherever a budget is honoured, so
Unlimited here means "do not stop", which for a
doubly-exponential algorithm means what it says.
Time is not, so a caller who needs the same answer on
every machine sets the first and leaves the second
BudgetRecording.
(#373)
system solver. Everything else in the library bounds itself by ceilings of its
own that this does not reach, so setting it does not make an arbitrary call
bounded.
Example
using var _ = MathS.Settings.Budget.Set(new WorkBudget { Steps = 100_000 });
using var recording = BudgetRecording.Start();
var solutions = MathS.Equations("x2 + y2 - 4", "x y - 1").Solve("x", "y");Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online