Skip to content

Commit

Permalink
Added multiplication. Code will be write later
Browse files Browse the repository at this point in the history
  • Loading branch information
rasnesakam committed May 30, 2024
1 parent 132624d commit 90e5aa6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/types/ops/matrix.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod add;
pub mod mul;
pub mod is_equal;
13 changes: 13 additions & 0 deletions src/types/ops/matrix/mul.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use crate::types::Matrix;
use std::ops::Mul;

/* For Square matrices */
impl <const ROW: usize, const COL: usize, const X: usize, T: std::marker::Copy> Mul<Matrix<COL,X,T>> for Matrix<ROW,COL,T>{
type Output = Matrix<ROW,X,T>;
fn mul(self, other: Matrix<COL,X,T>) -> Self::Output {
/* code here */
let mut result: Matrix<ROW, X, T> = Matrix::fill_with_value(self[9][0]);
todo!("Write Multiply code here.");
result
}
}

0 comments on commit 90e5aa6

Please sign in to comment.