#vector #vector-matrix #matrix #linear-algebra #algebra #42 #linear

bin+lib matrix42

A linear algebra library developed as a project in the 42 ecosystem

2 releases

0.1.1 Feb 17, 2025
0.1.0 Feb 17, 2025

#1028 in Math

Download history 181/week @ 2025-02-13 31/week @ 2025-02-20 8/week @ 2025-02-27 1/week @ 2025-03-06 2/week @ 2025-03-13

53 downloads per month

MIT license

46KB
1.5K SLoC

42KL-matrix

A linear algebra module written in Rust.

Note: This module is not meant to be performant, and are just an exercise to discover linear algebra & the algorithms computers use to perform linear algebra calculations.

Dependencies

All dependencies listed here.

  • approx: for floating point approx assertion macros (relative_eq!)
  • num: for generic number trait bounds (Float),generic MulAdd trait, complex number type support

Installation

Add to cargo project

cargo add matrix42

Functions

Supported Functions:

  • Addition, Subtraction, Scaling for Vector and Matrices
  • Vector Matrix multiplication, Matrix multiplication
  • Linear Combination
  • Linear Interpolation (lerp)
  • Dot Product
  • Manhattan Norm (L-1), Euclidean Norm (L-2), Infinity Norm (L-inf)
  • Cosine
  • Cross Product
  • Matrix Trace
  • Matrix Transpose
  • Matrix Row - Echelon Form
  • Matrix Inverse
  • Matrix Determinant
  • Matrix Rank

Dependencies

~500KB