Skip to main content

Module core

Module core 

Source
Expand description

Framework: traits, state shapes, the iteration driver, and the convergence and execution controls. The slot taxonomy is:

Modules§

augmented_lagrangian
Augmented-Lagrangian adapter for linear equality constraints.
barrier
Log-barrier adapter for linear inequality constraints.
checkpoint
Solver-aware checkpoints for exact continuation.
constraint
Constraint markers carried on the problem (tenet 4 in CONTRIBUTING.md). BoxConstraints (interval bounds, consumed by projection-based solvers), LinearInequalityConstraints (A x ≤ b, consumed by the log-barrier method), LinearEqualityConstraints (A x = b, consumed by the augmented-Lagrangian method), and NonlinearInequalityConstraints (c(x) ≤ 0 for an arbitrary vector-valued c, consumed by COBYLA).
convergence
Solver-owned convergence settings with compile-time backend capabilities.
executor
Iteration driver. The high-level entry point is Executor; Stepper exposes one-iteration-at-a-time control, and run_loop_with_control is the borrowed-problem variant used by composed solvers.
inner
Composition adapter: drive an inner solver from inside an outer solver’s next_iter.
least_squares
Robust objectives for nonlinear least squares.
math
Math abstraction the solvers depend on.
numdiff
Finite-difference derivative synthesis and analytic derivative checks.
observer
Read-only side effects fired around the iteration loop.
problem
Problem traits the user implements about their objective. Solvers bind on whichever subset they need (e.g. gradient descent requires CostFunction and Gradient; Nelder-Mead only needs CostFunction).
rng
Seedable, wasm-safe RNG used by stochastic solvers.
run_control
Execution budgets and application stopping conditions.
solver
The Solver trait every concrete solver implements. See the trait contract for the lifecycle (init once, then repeated next_iter, with an optional terminate hook) and the executor module for the canonical iteration ordering.
state
Solver state shapes.
termination
Stopping reasons and the deprecated Basin 1.x criterion facility.