Expand description
Optimization: continuous, combinatorial, and strategic.
The module root holds the scalar and unconstrained-gradient methods – golden section and Brent for a bracketed minimum of one variable, then gradient descent with and without momentum, Adam, numerical gradients, and the regression and curve fitting built on them.
The submodules take it further: lp for linear programming and
duality, integer for branch-and-bound and dynamic programming,
network for flows and scheduling, convex for L-BFGS, proximal
methods and ADMM, metaheuristics for the derivative-free and
population-based methods, game_theory for equilibria and
cooperative solutions, and least_squares for Levenberg-Marquardt.
Re-exports§
pub use least_squares::fit_exponential_decay;pub use least_squares::fit_gaussian_peak;pub use least_squares::levenberg_marquardt;pub use least_squares::LmResult;
Modules§
- convex
- Convex optimisation: gradient methods, quasi-Newton methods, proximal splitting, and constrained solvers.
- game_
theory - Game theory: equilibria, dynamics, cooperative solution concepts, auctions, and two-player search.
- integer
- Integer programming, dynamic programming, and combinatorial search.
- least_
squares - Nonlinear least squares: Levenberg-Marquardt.
- lp
- Linear programming: the simplex method, interior point methods, duality, and the classical models that reduce to a linear program.
- metaheuristics
- Derivative-free and population-based optimisation, and the benchmark landscapes used to tell one method from another.
- network
- Network models and scheduling: project planning, flows on networks, and the sequencing rules that provably optimise a stated objective.
Functions§
- adam
- Adam optimizer (β1=0.9, β2=0.999, ε=1e-8).
- brent_
min - Brent’s method for 1-D minimization, combining golden-section search with parabolic interpolation.
- golden_
section_ min - Golden-section search for the minimum of
fon[a, b]. - gradient_
descent - Vanilla gradient descent: x ← x − α∇f.
- gradient_
descent_ momentum - Gradient descent with momentum: v ← μv − α∇f, x ← x + v.
- linear_
regression - Ordinary linear regression: minimizes ‖a0 + a1·x − y‖₂ via
Householder-QR least squares (
linalg::qr::least_squares). - nelder_
mead - Nelder-Mead simplex algorithm for unconstrained minimization.
- numerical_
gradient_ vec - Central-difference numerical gradient of a scalar function of n variables.
- polynomial_
fit - Fit a polynomial of the given degree to (x, y) data by QR least squares on the Vandermonde matrix, falling back to normal equations with Gaussian elimination when the system is rank deficient.
- r_
squared - Coefficient of determination R² = 1 − SS_res / SS_tot.
- simulated_
annealing - Simulated annealing for unconstrained minimization.