Skip to main content

spectrafit_solver/
lib.rs

1//! spectrafit-solver — fitting engine with LM, lm-legacy (parity oracle), TRF,
2//! geodesic, dogleg, Newton-CG, IRLS, DE, VarPro, and auto routing.
3//!
4//! Public API:
5//!   - [`fit`] — dispatch to the appropriate solver based on `FitOptionsSpec.solver`
6//!   - [`SolverError`] — solver-layer error type (boundary-crossing failures)
7#![warn(missing_docs)]
8
9// Modules are private: the crate's entire public surface is the curated
10// `pub use` list below (house rule 26). Previously these were `pub mod`, which
11// let a consumer reach solver internals — `LmProblem`, the post-fit assembly,
12// the DE/IRLS drivers — directly, bypassing this list. Nothing outside the
13// crate ever did; `spectrafit_solver::fit` is the only external reference.
14mod dispatch;
15mod error;
16mod global;
17mod irls;
18mod lm_problem;
19mod postfit;
20
21pub use dispatch::fit;
22pub use error::SolverError;