@@ -63,7 +63,7 @@ pub use lapack_traits::{Pivot, UPLO};
63
63
/// If you plan to solve many equations with the same Hermitian (or real
64
64
/// symmetric) coefficient matrix `A` but different `b` vectors, it's faster to
65
65
/// factor the `A` matrix once using the `FactorizeH` trait, and then solve
66
- /// using the `FactorizedH ` struct.
66
+ /// using the `BKFactorized ` struct.
67
67
pub trait SolveH < A : Scalar > {
68
68
/// Solves a system of linear equations `A * x = b` with Hermitian (or real
69
69
/// symmetric) matrix `A`, where `A` is `self`, `b` is the argument, and
@@ -89,12 +89,12 @@ pub trait SolveH<A: Scalar> {
89
89
90
90
/// Represents the Bunch–Kaufman factorization of a Hermitian (or real
91
91
/// symmetric) matrix as `A = P * U * D * U^H * P^T`.
92
- pub struct FactorizedH < S : Data > {
92
+ pub struct BKFactorized < S : Data > {
93
93
pub a : ArrayBase < S , Ix2 > ,
94
94
pub ipiv : Pivot ,
95
95
}
96
96
97
- impl < A , S > SolveH < A > for FactorizedH < S >
97
+ impl < A , S > SolveH < A > for BKFactorized < S >
98
98
where
99
99
A : Scalar ,
100
100
S : Data < Elem = A > ,
@@ -136,25 +136,25 @@ where
136
136
pub trait FactorizeH < S : Data > {
137
137
/// Computes the Bunch–Kaufman factorization of a Hermitian (or real
138
138
/// symmetric) matrix.
139
- fn factorizeh ( & self ) -> Result < FactorizedH < S > > ;
139
+ fn factorizeh ( & self ) -> Result < BKFactorized < S > > ;
140
140
}
141
141
142
142
/// An interface for computing the Bunch–Kaufman factorization of Hermitian (or
143
143
/// real symmetric) matrices.
144
144
pub trait FactorizeHInto < S : Data > {
145
145
/// Computes the Bunch–Kaufman factorization of a Hermitian (or real
146
146
/// symmetric) matrix.
147
- fn factorizeh_into ( self ) -> Result < FactorizedH < S > > ;
147
+ fn factorizeh_into ( self ) -> Result < BKFactorized < S > > ;
148
148
}
149
149
150
150
impl < A , S > FactorizeHInto < S > for ArrayBase < S , Ix2 >
151
151
where
152
152
A : Scalar ,
153
153
S : DataMut < Elem = A > ,
154
154
{
155
- fn factorizeh_into ( mut self ) -> Result < FactorizedH < S > > {
155
+ fn factorizeh_into ( mut self ) -> Result < BKFactorized < S > > {
156
156
let ipiv = unsafe { A :: bk ( self . layout ( ) ?, UPLO :: Upper , self . as_allocated_mut ( ) ?) ? } ;
157
- Ok ( FactorizedH {
157
+ Ok ( BKFactorized {
158
158
a : self ,
159
159
ipiv : ipiv,
160
160
} )
@@ -166,10 +166,10 @@ where
166
166
A : Scalar ,
167
167
Si : Data < Elem = A > ,
168
168
{
169
- fn factorizeh ( & self ) -> Result < FactorizedH < OwnedRepr < A > > > {
169
+ fn factorizeh ( & self ) -> Result < BKFactorized < OwnedRepr < A > > > {
170
170
let mut a: Array2 < A > = replicate ( self ) ;
171
171
let ipiv = unsafe { A :: bk ( a. layout ( ) ?, UPLO :: Upper , a. as_allocated_mut ( ) ?) ? } ;
172
- Ok ( FactorizedH { a : a, ipiv : ipiv } )
172
+ Ok ( BKFactorized { a : a, ipiv : ipiv } )
173
173
}
174
174
}
175
175
@@ -197,7 +197,7 @@ pub trait InverseHInto {
197
197
fn invh_into ( self ) -> Result < Self :: Output > ;
198
198
}
199
199
200
- impl < A , S > InverseHInto for FactorizedH < S >
200
+ impl < A , S > InverseHInto for BKFactorized < S >
201
201
where
202
202
A : Scalar ,
203
203
S : DataMut < Elem = A > ,
@@ -217,15 +217,15 @@ where
217
217
}
218
218
}
219
219
220
- impl < A , S > InverseH for FactorizedH < S >
220
+ impl < A , S > InverseH for BKFactorized < S >
221
221
where
222
222
A : Scalar ,
223
223
S : Data < Elem = A > ,
224
224
{
225
225
type Output = Array2 < A > ;
226
226
227
227
fn invh ( & self ) -> Result < Self :: Output > {
228
- let f = FactorizedH {
228
+ let f = BKFactorized {
229
229
a : replicate ( & self . a ) ,
230
230
ipiv : self . ipiv . clone ( ) ,
231
231
} ;
0 commit comments