@@ -159,7 +159,7 @@ where
159
159
A : Scalar ,
160
160
S : Data < Elem = A > ,
161
161
{
162
- fn solvec_mut < ' a , Sb > ( & self , b : & ' a mut ArrayBase < Sb , Ix1 > ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
162
+ fn solvec_inplace < ' a , Sb > ( & self , b : & ' a mut ArrayBase < Sb , Ix1 > ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
163
163
where
164
164
Sb : DataMut < Elem = A > ,
165
165
{
@@ -205,7 +205,7 @@ pub trait CholeskyInto {
205
205
}
206
206
207
207
/// Cholesky decomposition of Hermitian (or real symmetric) positive definite mutable reference of matrix
208
- pub trait CholeskyMut {
208
+ pub trait CholeskyInplace {
209
209
/// Computes the Cholesky decomposition of the Hermitian (or real
210
210
/// symmetric) positive definite matrix, writing the result (`L` or `U`
211
211
/// according to the argument) to `self` and returning it.
@@ -214,7 +214,7 @@ pub trait CholeskyMut {
214
214
/// U^H * U` using the upper triangular portion of `A` and writes `U`.
215
215
/// Otherwise, if the argument is `UPLO::Lower`, computes the decomposition
216
216
/// `A = L * L^H` using the lower triangular portion of `A` and writes `L`.
217
- fn cholesky_mut ( & mut self , UPLO ) -> Result < & mut Self > ;
217
+ fn cholesky_inplace ( & mut self , UPLO ) -> Result < & mut Self > ;
218
218
}
219
219
220
220
impl < A , S > Cholesky for ArrayBase < S , Ix2 >
@@ -238,17 +238,17 @@ where
238
238
type Output = Self ;
239
239
240
240
fn cholesky_into ( mut self , uplo : UPLO ) -> Result < Self > {
241
- self . cholesky_mut ( uplo) ?;
241
+ self . cholesky_inplace ( uplo) ?;
242
242
Ok ( self )
243
243
}
244
244
}
245
245
246
- impl < A , S > CholeskyMut for ArrayBase < S , Ix2 >
246
+ impl < A , S > CholeskyInplace for ArrayBase < S , Ix2 >
247
247
where
248
248
A : Scalar ,
249
249
S : DataMut < Elem = A > ,
250
250
{
251
- fn cholesky_mut ( & mut self , uplo : UPLO ) -> Result < & mut Self > {
251
+ fn cholesky_inplace ( & mut self , uplo : UPLO ) -> Result < & mut Self > {
252
252
unsafe { A :: cholesky ( self . square_layout ( ) ?, uplo, self . as_allocated_mut ( ) ?) ? } ;
253
253
Ok ( self . into_triangular ( uplo) )
254
254
}
@@ -314,33 +314,33 @@ pub trait CholeskySolve<A: Scalar> {
314
314
/// the argument, and `x` is the successful result.
315
315
fn solvec < S : Data < Elem = A > > ( & self , b : & ArrayBase < S , Ix1 > ) -> Result < Array1 < A > > {
316
316
let mut b = replicate ( b) ;
317
- self . solvec_mut ( & mut b) ?;
317
+ self . solvec_inplace ( & mut b) ?;
318
318
Ok ( b)
319
319
}
320
320
/// Solves a system of linear equations `A * x = b` with Hermitian (or real
321
321
/// symmetric) positive definite matrix `A`, where `A` is `self`, `b` is
322
322
/// the argument, and `x` is the successful result.
323
323
fn solvec_into < S : DataMut < Elem = A > > ( & self , mut b : ArrayBase < S , Ix1 > ) -> Result < ArrayBase < S , Ix1 > > {
324
- self . solvec_mut ( & mut b) ?;
324
+ self . solvec_inplace ( & mut b) ?;
325
325
Ok ( b)
326
326
}
327
327
/// Solves a system of linear equations `A * x = b` with Hermitian (or real
328
328
/// symmetric) positive definite matrix `A`, where `A` is `self`, `b` is
329
329
/// the argument, and `x` is the successful result. The value of `x` is
330
330
/// also assigned to the argument.
331
- fn solvec_mut < ' a , S : DataMut < Elem = A > > ( & self , & ' a mut ArrayBase < S , Ix1 > ) -> Result < & ' a mut ArrayBase < S , Ix1 > > ;
331
+ fn solvec_inplace < ' a , S : DataMut < Elem = A > > ( & self , & ' a mut ArrayBase < S , Ix1 > ) -> Result < & ' a mut ArrayBase < S , Ix1 > > ;
332
332
}
333
333
334
334
impl < A , S > CholeskySolve < A > for ArrayBase < S , Ix2 >
335
335
where
336
336
A : Scalar ,
337
337
S : Data < Elem = A > ,
338
338
{
339
- fn solvec_mut < ' a , Sb > ( & self , b : & ' a mut ArrayBase < Sb , Ix1 > ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
339
+ fn solvec_inplace < ' a , Sb > ( & self , b : & ' a mut ArrayBase < Sb , Ix1 > ) -> Result < & ' a mut ArrayBase < Sb , Ix1 > >
340
340
where
341
341
Sb : DataMut < Elem = A > ,
342
342
{
343
- self . factorizec ( UPLO :: Upper ) ?. solvec_mut ( b)
343
+ self . factorizec ( UPLO :: Upper ) ?. solvec_inplace ( b)
344
344
}
345
345
}
346
346
0 commit comments