Mathematics

cat-mathematics

Crates with a mathematical aspect.

For most general-purpose math needs, nalgebra (linear algebra) and rand (random numbers) are excellent starting points. For graphics or game development, glam is often preferred. For statistics, statrs is comprehensive.If you're doing numerical computing, ndarray. There are also specific crates available for specialized areas like number theory or units of measurement.

Trigonometry

Linear Algebra

Vectors, matrices, eigenvalues, and eigenvectors. Key crates include:

  • nalgebra: A widely used and mature linear algebra library. Excellent for general-purpose linear algebra.
  • glam: A fast and ergonomic linear algebra library designed for graphics and games. Often preferred in those contexts.
  • ultraviolet: Another linear algebra library, with a focus on graphics.
  • ndarray: For N-dimensional arrays.Essential for numerical computation and data analysis.
  • nalgebra-lapack provides LAPACK bindings for linear algebra operations.

Probability and Statistics

Random variables, distributions, and hypothesis testing. Probabilistic models, stochastic processes, and statistical inference.

  • statrs: A comprehensive statistics library.
  • rand: While primarily for random number generation, rand also provides some statistical distributions and functions.

Random Number Generation

Generating random numbers for simulations, cryptography, etc.

  • rand: A popular and widely used random number generator crate.

Additional Numeric Types

  • num-bigint for arbitrary-precision integers.
  • num-rational for rational numbers.
  • num: A crate that provides numeric traits and other utilities.

Complex Numbers

Numerical Analysis

Numerical integration, differentiation, and root-finding.

  • rust-num: numerical traits and operations.
  • ndarray: numerical computations.

Optimization

Linear, nonlinear, and integer programming. Convex analysis. Game theory and decision-making models.

  • argmin: A pure Rust optimization library.
  • rust-lp: linear programming.

Differential Equations

Ordinary and partial differential equations and dynamical systems. Stability analysis, chaos theory, and control systems.

  • ode (solvers for ordinary differential equations).

Graph Theory

Graphs, networks, and shortest paths.

  • petgraph (graph data structures and algorithms).

Discrete Mathematics

Combinatorics, set theory, and logic.

  • bit-set (bit manipulation), regex (pattern matching).

Units of Measurement

  • uom: A type-safe dimensional analysis library.
  • Algorithms.
  • Cryptography.
  • Plotting and Graphing: Visualization.
  • Randomness.
  • Sorting.

Applications

  • Classical Machine Learning.
  • Deep Learning.
  • Science.
    • Geoscience
    • Neuroscience.
  • Robotics.
  • Search.
  • Simulation.