aboutsummaryrefslogtreecommitdiff
path: root/libpsi/src/maths/matrix_ops.rs
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2024-09-24 21:33:51 +0200
committerhachem <im@hachem.wtf>2024-09-24 21:33:51 +0200
commitc07ab7911bd50d0060841690a863333a9a3f226d (patch)
tree5deb12fc8234d553318e4615ae21ddfcc6db4ab4 /libpsi/src/maths/matrix_ops.rs
parent26010345eedc716c70e8a4219005db19b266c960 (diff)
rename project
Diffstat (limited to 'libpsi/src/maths/matrix_ops.rs')
-rw-r--r--libpsi/src/maths/matrix_ops.rs62
1 files changed, 0 insertions, 62 deletions
diff --git a/libpsi/src/maths/matrix_ops.rs b/libpsi/src/maths/matrix_ops.rs
deleted file mode 100644
index 15ab28b..0000000
--- a/libpsi/src/maths/matrix_ops.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-use super::{Float, Matrix};
-use core::ops;
-
-impl<T: Float> ops::Add<&Matrix<T>> for Matrix<T> {
- type Output = Option<Matrix<T>>;
-
- fn add(self, other: &Matrix<T>) -> Self::Output {
- self.add_to(other)
- }
-}
-
-impl<T: Float> ops::Sub<&Matrix<T>> for Matrix<T> {
- type Output = Option<Matrix<T>>;
-
- fn sub(self, other: &Matrix<T>) -> Self::Output {
- self.subtract(other)
- }
-}
-
-impl<T: Float> ops::Mul<T> for Matrix<T> {
- type Output = Matrix<T>;
-
- fn mul(self, scalar: T) -> Self::Output {
- self.scale(scalar)
- }
-}
-
-impl<T: Float> ops::Div<T> for Matrix<T> {
- type Output = Matrix<T>;
-
- fn div(self, scalar: T) -> Self::Output {
- self.scale(T::one() / scalar)
- }
-}
-
-impl<T: Float> ops::AddAssign<&Matrix<T>> for Matrix<T> {
- fn add_assign(&mut self, other: &Matrix<T>) {
- if let Some(result) = self.add_to(other) {
- *self = result;
- }
- }
-}
-
-impl<T: Float> ops::SubAssign<&Matrix<T>> for Matrix<T> {
- fn sub_assign(&mut self, other: &Matrix<T>) {
- if let Some(result) = self.subtract(other) {
- *self = result;
- }
- }
-}
-
-impl<T: Float> ops::MulAssign<T> for Matrix<T> {
- fn mul_assign(&mut self, scalar: T) {
- *self = self.scale(scalar);
- }
-}
-
-impl<T: Float> ops::DivAssign<T> for Matrix<T> {
- fn div_assign(&mut self, scalar: T) {
- *self = self.scale(T::one() / scalar);
- }
-}