Skip to content

Let the caller set the iteration budget on the three doubling solvers #300

Description

@kmolan

What: solve_discrete_riccati and solve_discrete_lyapunov fix MAXIMUM_PASSES = 64 as a
private constant and symmetric_eigendecomposition fixes max_sweeps = 60 as a local, so none of
the three can be tuned and none states its budget in its signature. An iterative API should take a
runtime budget with a documented default and a hard cap, which is what makes a worst-case execution
time computable for a caller running these at startup on a target. Take the
budget as an argument with the current values as the defaults, and report the passes taken on
success so a marginal design is distinguishable from a comfortable one.

Where: crates/multicalc/src/linear_algebra/riccati.rs, lyapunov.rs,
symmetric_eigendecomposition.rs.

How to test: cargo test -p multicalc; assert a problem needing more than a deliberately small
budget reports DidNotConverge, and that the default budget reproduces every existing result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededlinalgVectors, matrices, decompositionsno_stdKeeps the default no_std, no-alloc core

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions