Expand description
spectrafit-trust-region — a faer-native, graph-agnostic trust-region framework.
This crate owns the shared contract and vocabulary of nonlinear
least-squares fitting so that every solver method in the workspace
(spectrafit-levenberg-marquardt, and the planned dogleg / Newton-CG
crates) builds on one tested foundation, pure-Rust SIMD via
faer with no BLAS/C dependency.
§Design
TrustRegionProblemis the only coupling point: an implementor supplies weighted residuals and a weighted Jacobian written into caller-ownedfaerbuffers (plus matrix-freeJ·v/Jᵀ·uoperators for Krylov methods), and applies any parameter-space projection (bounds reflection, expression-tied parameters) inTrustRegionProblem::set_params.Report/Terminationare the generic outcome types every method reports, so consumers speak one vocabulary regardless of which method ran.
Each concrete method (its outer control loop and step computation) lives in
its own crate on top of this framework — e.g. the LM / TRF / geodesic loop is
in spectrafit-levenberg-marquardt. The framework depends only on
spectrafit-types (for CoreError) and faer, so it sits as a leaf next
to spectrafit-types in the workspace DAG.
Structs§
- Report
- Outcome of a solve. The optimised parameters live in the
problem(read viaTrustRegionProblem::params); this only carries diagnostics. - Step
Result - A scaled step produced by a
SubproblemStep. - Subproblem
- The trust-region subproblem at one outer iteration, in scaled coordinates.
- Trust
Region Config - Tuning for a single Δ-radius trust-region solve.
Enums§
- Termination
- Why the solve stopped.
Traits§
- Subproblem
Step - A trust-region subproblem solver: minimise the local quadratic model within
the scaled radius
Δ. One implementation per method (dogleg, Steihaug-CG). - Trust
Region Problem - A weighted nonlinear least-squares problem driven by the trust-region core.
Functions§
- minimize_
tr - Minimise
½‖r(p)‖²over the free parameters ofproblemwith an explicit Δ-radius trust region, delegating the per-iteration subproblem tostep.