SkillAgentSearch skills...

Mtrx

Provides type-safe matrix operations using Rust's const generics

Install / Use

/learn @brenapp/Mtrx
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Mtrx

Matrix operations using Rust's new const generics feature. Matrix sizes are determined at compile time, allowing better type checking.

Supported Operations

  • Addition
  • Subtraction
  • Scalar Multiplication
  • Matrix Multiplication
  • Matrix Vector Product
  • Transposition
  • Matrix Powers
let matrix_a = Matrix::new([[1, 2, 3], [4, 5, 6]]);
let matrix_b = Matrix::new([[7, 8], [9, 10], [11, 12]]);

let result: Matrix<i32, 2, 2> = matrix_a.multiply(matrix_b);
assert_eq!(result.inner, [[58, 64], [139, 154]]);

let result = matrix_a * matrix_b;
assert_eq!(result.inner, [[58, 64], [139, 154]]);
View on GitHub
GitHub Stars46
CategoryDevelopment
Updated1y ago
Forks3

Languages

Rust

Security Score

60/100

Audited on Oct 6, 2024

No findings