Crate matrix_basic

source ·
Expand description

This is a crate for very basic matrix operations with any type that implement Add, Sub, Mul, Zero, Neg and Copy. Additional properties might be needed for certain operations.

I created it mostly to learn using generic types and traits.

Sayantan Santra (2023)

Modules

Structs

Traits

  • Trait for conversion between matrices of different types. It only has a matrix_from() method. This is needed since negative trait bound are not supported in stable Rust yet, so we’ll have a conflict trying to implement From. I plan to change this to the default From trait as soon as some sort of specialization system is implemented. You can track this issue here.
  • Sister trait of MatrixFrom. Basically does the same thing, just with a different syntax.
  • Trait a type must satisfy to be element of a matrix. This is mostly to reduce writing trait bounds afterwards.