More matrix instances dev

Fri, 05 Sep 2025 00:55:10 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Fri, 05 Sep 2025 00:55:10 -0500
branch
dev
changeset 178
073ea94b119a
parent 177
b071a1b484f8
child 179
724413fc8d17

More matrix instances

src/nalgebra_support.rs file | annotate | diff | comparison | revisions
--- a/src/nalgebra_support.rs	Fri Sep 05 00:48:59 2025 -0500
+++ b/src/nalgebra_support.rs	Fri Sep 05 00:55:10 2025 -0500
@@ -242,15 +242,16 @@
     }
 }
 
-impl<'a, S1, M, K, E> Instance<Matrix<E, M, K, S1>, MatrixDecomposition>
-    for MyCow<'a, OMatrix<E, M, K>>
+impl<'a, S1, M, SM, K, E> Instance<Matrix<E, M, K, S1>, MatrixDecomposition>
+    for MyCow<'a, Matrix<E, M, K, SM>>
 where
     S1: Storage<E, M, K>,
+    SM: Storage<E, M, K>,
     M: Dim,
     K: Dim,
     E: Scalar + Zero + One + Copy,
     DefaultAllocator: Allocator<M, K>,
-    ShapeConstraint: StridesOk<E, M, K>,
+    ShapeConstraint: StridesOk<E, M, K, SM> + StridesOk<E, M, K>,
 {
     #[inline]
     fn eval_ref<'b, R>(
@@ -274,7 +275,7 @@
     where
         Self: 'b,
     {
-        self
+        self.cow_owned()
     }
 
     #[inline]
@@ -282,7 +283,7 @@
     where
         Self: 'b,
     {
-        self
+        self.cow_owned()
     }
 }
 

mercurial