MCPcopy Index your code
hub / github.com/argmin-rs/argmin

github.com/argmin-rs/argmin @argmin-v0.11.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release argmin-v0.11.0 ↗ · + Follow
1,867 symbols 5,236 edges 312 files 483 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mathematical optimization in pure Rust

Website | Book | Docs (latest release) | Docs (main branch) | Examples (latest release) | Examples (main branch)

Crates.io version

Crates.io downloads GitHub Actions workflow status License argmin Discord

argmin is a numerical optimization library written entirely in Rust.

argmin's goal is to offer a wide range of optimization algorithms with a consistent interface. It is type-agnostic by design, meaning that any type and/or math backend, such as nalgebra or ndarray can be used -- even your own.

Observers allow one to track the progress of iterations, either by using one of the provided ones for logging to screen or disk or by implementing your own.

An optional checkpointing mechanism helps to mitigate the negative effects of crashes in unstable computing environments.

Due to Rust's powerful generics and traits, most features can be exchanged for your own tailored implementations.

argmin is designed to simplify the implementation of optimization algorithms and as such can also be used as a toolbox for the development of new algorithms. One can focus on the algorithm itself, while the handling of termination, parameter vectors, populations, gradients, Jacobians and Hessians is taken care of by the library.

Algorithms

  • Line searches
  • Backtracking line search
  • More-Thuente line search
  • Hager-Zhang line search
  • Trust region method
  • Cauchy point method
  • Dogleg method
  • Steihaug method
  • Steepest descent
  • Conjugate gradient method
  • Nonlinear conjugate gradient method
  • Newton methods
  • Newton’s method
  • Newton-CG
  • Quasi-Newton methods
  • BFGS
  • L-BFGS
  • DFP
  • SR1
  • SR1-TrustRegion
  • Gauss-Newton method
  • Gauss-Newton method with linesearch
  • Golden-section search
  • Landweber iteration
  • Brent’s method
  • Nelder-Mead method
  • Simulated Annealing
  • Particle Swarm Optimization

External solvers compatible with argmin

External solvers which implement the Solver trait are compatible with argmin's Executor, and as such can leverage features like checkpointing and observers.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

ArgminDot (Interface)
Dot/scalar product of `T` and `self` [28 implementers]
crates/argmin-math/src/lib.rs
Solver (Interface)
The interface all solvers are required to implement. Every solver needs to implement this trait in order to function wi [28 …
crates/argmin/src/core/solver.rs
ArgminZeroLike (Interface)
Zero for dynamically sized objects [6 implementers]
crates/argmin-math/src/lib.rs
Operator (Interface)
Defines the application of an operator to a parameter vector. # Example ``` use argmin::core::{Operator, Error}; use a [13 …
crates/argmin/src/core/problem.rs
ArgminAdd (Interface)
Add a `T` to `self` [19 implementers]
crates/argmin-math/src/lib.rs
CostFunction (Interface)
Defines computation of a cost function value # Example ``` use argmin::core::{CostFunction, Error}; use argmin_testfun [42 …
crates/argmin/src/core/problem.rs
ArgminSub (Interface)
Subtract a `T` from `self` [19 implementers]
crates/argmin-math/src/lib.rs
Gradient (Interface)
Defines the computation of the gradient. # Example ``` use argmin::core::{Gradient, Error}; # fn compute_gradient(_a: [31 …
crates/argmin/src/core/problem.rs

Core symbols most depended-on inside this repo

param
called by 162
crates/argmin/src/core/state/iterstate.rs
dot
called by 82
crates/argmin-math/src/nalgebra_m/dot.rs
run
called by 70
crates/argmin/src/core/executor.rs
configure
called by 69
crates/argmin/src/core/executor.rs
mul
called by 63
crates/argmin-math/src/nalgebra_m/mul.rs
max_iters
called by 58
crates/argmin/src/core/state/iterstate.rs
add
called by 49
crates/finitediff/src/pert.rs
take_param
called by 47
crates/argmin/src/core/state/iterstate.rs

Shape

Method 852
Function 802
Class 162
Interface 39
Enum 12

Languages

Rust84%
TypeScript16%

Modules by API surface

crates/argmin/src/core/state/iterstate.rs59 symbols
crates/finitediff/src/vec/mod.rs41 symbols
crates/finitediff/src/ndarr/mod.rs41 symbols
crates/finitediff/src/array/mod.rs41 symbols
media/website/sass/bootstrap/js/src/tooltip.js40 symbols
crates/finitediff/benches/bench.rs38 symbols
crates/argmin/src/solver/neldermead/mod.rs37 symbols
crates/argmin/src/core/state/populationstate.rs36 symbols
crates/argmin/src/solver/simulatedannealing/mod.rs32 symbols
media/website/sass/bootstrap/js/src/modal.js31 symbols
media/website/sass/bootstrap/js/src/carousel.js31 symbols
crates/argmin/src/core/problem.rs31 symbols

For agents

$ claude mcp add argmin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page