#complex-numbers #tensor #complexmatrix #numericalanalysis

bin+lib crum

Tensors, Matrices and Complex numbers for numerical analysis

4 releases (2 breaking)

0.3.0 Feb 21, 2025
0.2.1 Feb 4, 2025
0.1.1 Jan 29, 2025
0.1.0 Jan 28, 2025

#454 in Math

Download history 188/week @ 2025-01-25 169/week @ 2025-02-01 22/week @ 2025-02-08 88/week @ 2025-02-15 60/week @ 2025-02-22 10/week @ 2025-03-01

192 downloads per month

MIT/Apache

120KB
2K SLoC

Rust 1.5K SLoC // 0.1% comments Jupyter Notebooks 338 SLoC // 0.1% comments

crum

Complex (Numbers) Rust Und Matrices

crum is a work-in-progress Rust crate for implementing complex numbers and matrices with a large focus on complex matrices—entirely from scratch, with no unsafe calls to established libraries such as LAPACK.

NB: This is an experimental in beta package, use at your own discretion. Some functionality, although defined, have not been implemented.

The repository owner accepts no responsibility nor liability for any consequences of the use of this package.

Features

Tensors

  • easy tensor creation macro
  • range based, random, zeroes, ones creation functions
  • multi-dimensional transpose ( as in Numpy )
  • Multi-dimensional contraction using Einstein's Summation Notation ( as per Numpy )

Complex Numbers

  • num_traits Float and Num for generic complex number type Complex(incomplete)<T>
  • mimic std c++ <complex> functionality
  • generic for all primitive types

Matrices

  • generic to all types implementing num_traits Float and Num
  • extra vector functions
  • complex number specific functionality such Complex Householder Transform, Complex QR decomposition, Schur Decomposition
  • LU Decomposition(Gauss Elimination with Partial Pivot) for real matrices.
  • Real Square matrix determinant
  • Solve linear system of equations with LU decomposition.

Dependencies

~0.6–1.1MB
~24K SLoC