Skip to main content

spectrafit_dogleg/
lib.rs

1//! spectrafit-dogleg — Powell's dogleg trust-region method.
2//!
3//! One *method* on the graph-agnostic
4//! [`spectrafit-trust-region`](spectrafit_trust_region) framework: it supplies
5//! the [`DoglegStep`] subproblem solver (Gauss–Newton / Cauchy interpolation
6//! within the trust radius) and a thin [`minimize`] entry point; the framework
7//! owns the Δ-radius control loop, gain-ratio acceptance and Moré scaling.
8//!
9//! Dogleg is a robust, cheap workhorse on mildly nonlinear least-squares
10//! problems: it is full Gauss–Newton near the optimum and steepest-descent-like
11//! far from it, all via one `p×p` Cholesky per iteration.
12#![warn(missing_docs)]
13
14mod driver;
15mod problem;
16mod step;
17
18pub use driver::minimize;
19pub use problem::TrustRegionProblem;
20pub use step::DoglegStep;
21
22// Re-export the framework config + outcome types so consumers depend only on
23// this crate for the full dogleg API surface.
24pub use spectrafit_trust_region::{Report, Termination, TrustRegionConfig};
25
26#[cfg(test)]
27mod tests;