-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added multiplication. Code will be write later
- Loading branch information
1 parent
132624d
commit 90e5aa6
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod add; | ||
pub mod mul; | ||
pub mod is_equal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |