src/nalgebra_support.rs

branch
dev
changeset 178
073ea94b119a
parent 177
b071a1b484f8
child 180
ec5a811eab09
equal deleted inserted replaced
177:b071a1b484f8 178:073ea94b119a
240 { 240 {
241 self.cow_owned() 241 self.cow_owned()
242 } 242 }
243 } 243 }
244 244
245 impl<'a, S1, M, K, E> Instance<Matrix<E, M, K, S1>, MatrixDecomposition> 245 impl<'a, S1, M, SM, K, E> Instance<Matrix<E, M, K, S1>, MatrixDecomposition>
246 for MyCow<'a, OMatrix<E, M, K>> 246 for MyCow<'a, Matrix<E, M, K, SM>>
247 where 247 where
248 S1: Storage<E, M, K>, 248 S1: Storage<E, M, K>,
249 SM: Storage<E, M, K>,
249 M: Dim, 250 M: Dim,
250 K: Dim, 251 K: Dim,
251 E: Scalar + Zero + One + Copy, 252 E: Scalar + Zero + One + Copy,
252 DefaultAllocator: Allocator<M, K>, 253 DefaultAllocator: Allocator<M, K>,
253 ShapeConstraint: StridesOk<E, M, K>, 254 ShapeConstraint: StridesOk<E, M, K, SM> + StridesOk<E, M, K>,
254 { 255 {
255 #[inline] 256 #[inline]
256 fn eval_ref<'b, R>( 257 fn eval_ref<'b, R>(
257 &'b self, 258 &'b self,
258 f: impl FnOnce(<MatrixDecomposition as Decomposition<Matrix<E, M, K, S1>>>::Reference<'b>) -> R, 259 f: impl FnOnce(<MatrixDecomposition as Decomposition<Matrix<E, M, K, S1>>>::Reference<'b>) -> R,
272 #[inline] 273 #[inline]
273 fn cow<'b>(self) -> MyCow<'b, OMatrix<E, M, K>> 274 fn cow<'b>(self) -> MyCow<'b, OMatrix<E, M, K>>
274 where 275 where
275 Self: 'b, 276 Self: 'b,
276 { 277 {
277 self 278 self.cow_owned()
278 } 279 }
279 280
280 #[inline] 281 #[inline]
281 fn decompose<'b>(self) -> MyCow<'b, OMatrix<E, M, K>> 282 fn decompose<'b>(self) -> MyCow<'b, OMatrix<E, M, K>>
282 where 283 where
283 Self: 'b, 284 Self: 'b,
284 { 285 {
285 self 286 self.cow_owned()
286 } 287 }
287 } 288 }
288 289
289 impl<SM, N, M, K, E> Mapping<OMatrix<E, M, K>> for Matrix<E, N, M, SM> 290 impl<SM, N, M, K, E> Mapping<OMatrix<E, M, K>> for Matrix<E, N, M, SM>
290 where 291 where

mercurial