src/nalgebra_support.rs

branch
dev
changeset 168
93daa824c04a
parent 167
effb80efba09
child 169
114ecdf63ce5
--- a/src/nalgebra_support.rs	Wed Sep 03 14:27:21 2025 -0500
+++ b/src/nalgebra_support.rs	Wed Sep 03 17:59:24 2025 -0500
@@ -145,6 +145,7 @@
     DefaultAllocator: Allocator<M, K>,
     ShapeConstraint: StridesOk<E, M, K, S1> + StridesOk<E, M, K, S2>,
 {
+    #[inline]
     fn eval_decompose<'b, R>(self, f: impl FnOnce(OMatrix<E, M, K>) -> R) -> R
     where
         Self: 'b,
@@ -152,6 +153,7 @@
         f(self.into_owned())
     }
 
+    #[inline]
     fn eval_ref_decompose<'b, R>(
         &'b self,
         f: impl FnOnce(<MatrixDecomposition as Decomposition<Matrix<E, M, K, S1>>>::Reference<'b>) -> R,
@@ -167,6 +169,14 @@
     fn own(self) -> OMatrix<E, M, K> {
         self.into_owned()
     }
+
+    #[inline]
+    fn cow<'b>(self) -> MyCow<'b, OMatrix<E, M, K>>
+    where
+        Self: 'b,
+    {
+        self.cow_owned()
+    }
 }
 
 impl<'a, S1, S2, M, K, E> Instance<Matrix<E, M, K, S1>, MatrixDecomposition>
@@ -202,6 +212,14 @@
     fn own(self) -> OMatrix<E, M, K> {
         self.into_owned()
     }
+
+    #[inline]
+    fn cow<'b>(self) -> MyCow<'b, OMatrix<E, M, K>>
+    where
+        Self: 'b,
+    {
+        self.cow_owned()
+    }
 }
 
 impl<SM, SV, N, M, K, E> Mapping<Matrix<E, M, K, SV>> for Matrix<E, N, M, SM>

mercurial