Format file
This commit is contained in:
parent
372152dc31
commit
ccbd0f02e5
|
@ -42,7 +42,7 @@ where
|
|||
vsl: OMatrix<T, D, D>,
|
||||
s: OMatrix<T, D, D>,
|
||||
vsr: OMatrix<T, D, D>,
|
||||
t: OMatrix<T, D, D>
|
||||
t: OMatrix<T, D, D>,
|
||||
}
|
||||
|
||||
impl<T: Scalar + Copy, D: Dim> Copy for QZ<T, D>
|
||||
|
@ -140,14 +140,27 @@ where
|
|||
);
|
||||
lapack_check!(info);
|
||||
|
||||
Some(QZ {alphar, alphai, beta,
|
||||
vsl, s:a,
|
||||
vsr, t:b})
|
||||
Some(QZ {
|
||||
alphar,
|
||||
alphai,
|
||||
beta,
|
||||
vsl,
|
||||
s: a,
|
||||
vsr,
|
||||
t: b,
|
||||
})
|
||||
}
|
||||
|
||||
/// Retrieves the unitary matrix `Q` and the upper-quasitriangular matrix `T` such that the
|
||||
/// decomposed matrix equals `Q * T * Q.transpose()`.
|
||||
pub fn unpack(self) -> (OMatrix<T, D, D>, OMatrix<T, D, D>, OMatrix<T, D, D>, OMatrix<T, D, D>){
|
||||
pub fn unpack(
|
||||
self,
|
||||
) -> (
|
||||
OMatrix<T, D, D>,
|
||||
OMatrix<T, D, D>,
|
||||
OMatrix<T, D, D>,
|
||||
OMatrix<T, D, D>,
|
||||
) {
|
||||
(self.vsl, self.s, self.t, self.vsr)
|
||||
}
|
||||
|
||||
|
@ -160,8 +173,10 @@ where
|
|||
let mut out = Matrix::zeros_generic(self.t.shape_generic().0, Const::<1>);
|
||||
|
||||
for i in 0..out.len() {
|
||||
out[i] = Complex::new(self.alphar[i].clone()/self.beta[i].clone(),
|
||||
self.alphai[i].clone()/self.beta[i].clone())
|
||||
out[i] = Complex::new(
|
||||
self.alphar[i].clone() / self.beta[i].clone(),
|
||||
self.alphai[i].clone() / self.beta[i].clone(),
|
||||
)
|
||||
}
|
||||
|
||||
out
|
||||
|
@ -197,7 +212,7 @@ pub trait QZScalar: Scalar {
|
|||
work: &mut [Self],
|
||||
lwork: i32,
|
||||
bwork: &mut [i32],
|
||||
info: &mut i32
|
||||
info: &mut i32,
|
||||
);
|
||||
|
||||
#[allow(missing_docs)]
|
||||
|
@ -220,7 +235,7 @@ pub trait QZScalar: Scalar {
|
|||
vsr: &mut [Self],
|
||||
ldvsr: i32,
|
||||
bwork: &mut [i32],
|
||||
info: &mut i32
|
||||
info: &mut i32,
|
||||
) -> i32;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue