@@ -70,7 +70,7 @@ pub use lapack_traits::{Pivot, Transpose};
70
70
///
71
71
/// If you plan to solve many equations with the same `A` matrix but different
72
72
/// `b` vectors, it's faster to factor the `A` matrix once using the
73
- /// `Factorize` trait, and then solve using the `Factorized ` struct.
73
+ /// `Factorize` trait, and then solve using the `LUFactorized ` struct.
74
74
pub trait Solve < A : Scalar > {
75
75
/// Solves a system of linear equations `A * x = b` where `A` is `self`, `b`
76
76
/// is the argument, and `x` is the successful result.
@@ -125,15 +125,15 @@ pub trait Solve<A: Scalar> {
125
125
}
126
126
127
127
/// Represents the LU factorization of a matrix `A` as `A = P*L*U`.
128
- pub struct Factorized < S : Data > {
128
+ pub struct LUFactorized < S : Data > {
129
129
/// The factors `L` and `U`; the unit diagonal elements of `L` are not
130
130
/// stored.
131
131
pub a : ArrayBase < S , Ix2 > ,
132
132
/// The pivot indices that define the permutation matrix `P`.
133
133
pub ipiv : Pivot ,
134
134
}
135
135
136
- impl < A , S > Solve < A > for Factorized < S >
136
+ impl < A , S > Solve < A > for LUFactorized < S >
137
137
where
138
138
A : Scalar ,
139
139
S : Data < Elem = A > ,
@@ -218,24 +218,24 @@ where
218
218
pub trait Factorize < S : Data > {
219
219
/// Computes the LU factorization `A = P*L*U`, where `P` is a permutation
220
220
/// matrix.
221
- fn factorize ( & self ) -> Result < Factorized < S > > ;
221
+ fn factorize ( & self ) -> Result < LUFactorized < S > > ;
222
222
}
223
223
224
224
/// An interface for computing LU factorizations of matrices.
225
225
pub trait FactorizeInto < S : Data > {
226
226
/// Computes the LU factorization `A = P*L*U`, where `P` is a permutation
227
227
/// matrix.
228
- fn factorize_into ( self ) -> Result < Factorized < S > > ;
228
+ fn factorize_into ( self ) -> Result < LUFactorized < S > > ;
229
229
}
230
230
231
231
impl < A , S > FactorizeInto < S > for ArrayBase < S , Ix2 >
232
232
where
233
233
A : Scalar ,
234
234
S : DataMut < Elem = A > ,
235
235
{
236
- fn factorize_into ( mut self ) -> Result < Factorized < S > > {
236
+ fn factorize_into ( mut self ) -> Result < LUFactorized < S > > {
237
237
let ipiv = unsafe { A :: lu ( self . layout ( ) ?, self . as_allocated_mut ( ) ?) ? } ;
238
- Ok ( Factorized {
238
+ Ok ( LUFactorized {
239
239
a : self ,
240
240
ipiv : ipiv,
241
241
} )
@@ -247,10 +247,10 @@ where
247
247
A : Scalar ,
248
248
Si : Data < Elem = A > ,
249
249
{
250
- fn factorize ( & self ) -> Result < Factorized < OwnedRepr < A > > > {
250
+ fn factorize ( & self ) -> Result < LUFactorized < OwnedRepr < A > > > {
251
251
let mut a: Array2 < A > = replicate ( self ) ;
252
252
let ipiv = unsafe { A :: lu ( a. layout ( ) ?, a. as_allocated_mut ( ) ?) ? } ;
253
- Ok ( Factorized { a : a, ipiv : ipiv } )
253
+ Ok ( LUFactorized { a : a, ipiv : ipiv } )
254
254
}
255
255
}
256
256
@@ -268,7 +268,7 @@ pub trait InverseInto {
268
268
fn inv_into ( self ) -> Result < Self :: Output > ;
269
269
}
270
270
271
- impl < A , S > InverseInto for Factorized < S >
271
+ impl < A , S > InverseInto for LUFactorized < S >
272
272
where
273
273
A : Scalar ,
274
274
S : DataMut < Elem = A > ,
@@ -287,15 +287,15 @@ where
287
287
}
288
288
}
289
289
290
- impl < A , S > Inverse for Factorized < S >
290
+ impl < A , S > Inverse for LUFactorized < S >
291
291
where
292
292
A : Scalar ,
293
293
S : Data < Elem = A > ,
294
294
{
295
295
type Output = Array2 < A > ;
296
296
297
297
fn inv ( & self ) -> Result < Array2 < A > > {
298
- let f = Factorized {
298
+ let f = LUFactorized {
299
299
a : replicate ( & self . a ) ,
300
300
ipiv : self . ipiv . clone ( ) ,
301
301
} ;
0 commit comments