@@ -166,13 +166,7 @@ where
166166 A : Scalar + Lapack ,
167167 S : Data < Elem = A > ,
168168{
169- fn solvec_inplace < ' a , Sb > (
170- & self ,
171- b : & ' a mut ArrayBase < Sb , Ix1 > ,
172- ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
173- where
174- Sb : DataMut < Elem = A > ,
175- {
169+ fn solvec_inplace < ' a > ( & self , b : & ' a mut ArrayRef < A , Ix1 > ) -> Result < & ' a mut ArrayRef < A , Ix1 > > {
176170 A :: solve_cholesky (
177171 self . factor . square_layout ( ) ?,
178172 self . uplo ,
@@ -225,10 +219,9 @@ pub trait CholeskyInplace {
225219 fn cholesky_inplace ( & mut self , uplo : UPLO ) -> Result < & mut Self > ;
226220}
227221
228- impl < A , S > Cholesky for ArrayBase < S , Ix2 >
222+ impl < A > Cholesky for ArrayRef < A , Ix2 >
229223where
230224 A : Scalar + Lapack ,
231- S : Data < Elem = A > ,
232225{
233226 type Output = Array2 < A > ;
234227
@@ -251,10 +244,9 @@ where
251244 }
252245}
253246
254- impl < A , S > CholeskyInplace for ArrayBase < S , Ix2 >
247+ impl < A > CholeskyInplace for ArrayRef < A , Ix2 >
255248where
256249 A : Scalar + Lapack ,
257- S : DataMut < Elem = A > ,
258250{
259251 fn cholesky_inplace ( & mut self , uplo : UPLO ) -> Result < & mut Self > {
260252 A :: cholesky ( self . square_layout ( ) ?, uplo, self . as_allocated_mut ( ) ?) ?;
@@ -301,10 +293,9 @@ where
301293 }
302294}
303295
304- impl < A , Si > FactorizeC < OwnedRepr < A > > for ArrayBase < Si , Ix2 >
296+ impl < A > FactorizeC < OwnedRepr < A > > for ArrayRef < A , Ix2 >
305297where
306298 A : Scalar + Lapack ,
307- Si : Data < Elem = A > ,
308299{
309300 fn factorizec ( & self , uplo : UPLO ) -> Result < CholeskyFactorized < OwnedRepr < A > > > {
310301 Ok ( CholeskyFactorized {
@@ -320,7 +311,7 @@ pub trait SolveC<A: Scalar> {
320311 /// Solves a system of linear equations `A * x = b` with Hermitian (or real
321312 /// symmetric) positive definite matrix `A`, where `A` is `self`, `b` is
322313 /// the argument, and `x` is the successful result.
323- fn solvec < S : Data < Elem = A > > ( & self , b : & ArrayBase < S , Ix1 > ) -> Result < Array1 < A > > {
314+ fn solvec ( & self , b : & ArrayRef < A , Ix1 > ) -> Result < Array1 < A > > {
324315 let mut b = replicate ( b) ;
325316 self . solvec_inplace ( & mut b) ?;
326317 Ok ( b)
@@ -339,24 +330,14 @@ pub trait SolveC<A: Scalar> {
339330 /// symmetric) positive definite matrix `A`, where `A` is `self`, `b` is
340331 /// the argument, and `x` is the successful result. The value of `x` is
341332 /// also assigned to the argument.
342- fn solvec_inplace < ' a , S : DataMut < Elem = A > > (
343- & self ,
344- b : & ' a mut ArrayBase < S , Ix1 > ,
345- ) -> Result < & ' a mut ArrayBase < S , Ix1 > > ;
333+ fn solvec_inplace < ' a > ( & self , b : & ' a mut ArrayRef < A , Ix1 > ) -> Result < & ' a mut ArrayRef < A , Ix1 > > ;
346334}
347335
348- impl < A , S > SolveC < A > for ArrayBase < S , Ix2 >
336+ impl < A > SolveC < A > for ArrayRef < A , Ix2 >
349337where
350338 A : Scalar + Lapack ,
351- S : Data < Elem = A > ,
352339{
353- fn solvec_inplace < ' a , Sb > (
354- & self ,
355- b : & ' a mut ArrayBase < Sb , Ix1 > ,
356- ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
357- where
358- Sb : DataMut < Elem = A > ,
359- {
340+ fn solvec_inplace < ' a > ( & self , b : & ' a mut ArrayRef < A , Ix1 > ) -> Result < & ' a mut ArrayRef < A , Ix1 > > {
360341 self . factorizec ( UPLO :: Upper ) ?. solvec_inplace ( b)
361342 }
362343}
@@ -377,10 +358,9 @@ pub trait InverseCInto {
377358 fn invc_into ( self ) -> Result < Self :: Output > ;
378359}
379360
380- impl < A , S > InverseC for ArrayBase < S , Ix2 >
361+ impl < A > InverseC for ArrayRef < A , Ix2 >
381362where
382363 A : Scalar + Lapack ,
383- S : Data < Elem = A > ,
384364{
385365 type Output = Array2 < A > ;
386366
@@ -435,10 +415,9 @@ pub trait DeterminantCInto {
435415 fn ln_detc_into ( self ) -> Self :: Output ;
436416}
437417
438- impl < A , S > DeterminantC for ArrayBase < S , Ix2 >
418+ impl < A > DeterminantC for ArrayRef < A , Ix2 >
439419where
440420 A : Scalar + Lapack ,
441- S : Data < Elem = A > ,
442421{
443422 type Output = Result < <A as Scalar >:: Real > ;
444423
0 commit comments