feat!: method stubs for mult and sub
This commit is contained in:
parent
fc379614c7
commit
0412ac54d5
3 changed files with 15 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -4,4 +4,4 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matrix"
|
name = "matrix"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "matrix"
|
name = "matrix"
|
||||||
version = "0.1.4-1"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Zhongheng Liu <z.liu@outlook.com.gr>"]
|
authors = ["Zhongheng Liu <z.liu@outlook.com.gr>"]
|
||||||
homepage = "https://stvnliu.gitlab.io"
|
homepage = "https://stvnliu.gitlab.io"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
//!
|
//!
|
||||||
//! TODO:: Create matrix multiplication method
|
//! TODO:: Create matrix multiplication method
|
||||||
|
|
||||||
use std::{fmt::Display, ops::Add, str::FromStr};
|
use std::{fmt::Display, ops::{Add, Mul, Sub}, str::FromStr};
|
||||||
|
|
||||||
use super::matrix_err::{MatrixSetValueError, ParseMatrixError};
|
use super::matrix_err::{MatrixSetValueError, ParseMatrixError};
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
|
|
@ -86,6 +86,18 @@ impl<'a, 'b> Add<&'b Matrix> for &'a Matrix {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl<'a, 'b> Sub<&'b Matrix> for &'a Matrix {
|
||||||
|
type Output = Matrix;
|
||||||
|
fn sub(self, rhs: &'b Matrix) -> Self::Output {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'a, 'b> Mul<&'b Matrix> for &'a Matrix {
|
||||||
|
type Output = Matrix;
|
||||||
|
fn mul(self, rhs: &'b Matrix) -> Self::Output {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Matrix {
|
impl Matrix {
|
||||||
/// Matrix initialiser function.
|
/// Matrix initialiser function.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue