clippy: fix #identity_op

This commit is contained in:
Philippe Renon 2020-10-11 11:23:05 +02:00
parent 1624a87efa
commit 0b0f248267
4 changed files with 10 additions and 10 deletions

View File

@ -363,8 +363,8 @@ where
while self.nrows() - i >= 8 {
acc0 += unsafe {
conjugate(self.get_unchecked((i + 0, j)).inlined_clone())
* rhs.get_unchecked((i + 0, j)).inlined_clone()
conjugate(self.get_unchecked((i, j)).inlined_clone())
* rhs.get_unchecked((i, j)).inlined_clone()
};
acc1 += unsafe {
conjugate(self.get_unchecked((i + 1, j)).inlined_clone())

View File

@ -136,9 +136,9 @@ where
let m = end - 1;
let n = end;
let h11 = t[(start + 0, start + 0)];
let h12 = t[(start + 0, start + 1)];
let h21 = t[(start + 1, start + 0)];
let h11 = t[(start, start)];
let h12 = t[(start, start + 1)];
let h21 = t[(start + 1, start)];
let h22 = t[(start + 1, start + 1)];
let h32 = t[(start + 2, start + 1)];
@ -161,7 +161,7 @@ where
if not_zero {
if k > start {
t[(k + 0, k - 1)] = norm;
t[(k, k - 1)] = norm;
t[(k + 1, k - 1)] = N::zero();
t[(k + 2, k - 1)] = N::zero();
}

View File

@ -218,9 +218,9 @@ where
}
}
diagonal[k + 0] = subm[(0, 0)];
diagonal[k] = subm[(0, 0)];
diagonal[k + 1] = subm[(1, 1)];
off_diagonal[k + 0] = subm[(0, 1)];
off_diagonal[k] = subm[(0, 1)];
if k != n - 1 {
off_diagonal[k + 1] = subm[(1, 2)];
@ -244,7 +244,7 @@ where
let u2 = u2.map(|u2| GivensRotation::new_unchecked(u2.c(), N::from_real(u2.s())));
let v2 = v2.map(|v2| GivensRotation::new_unchecked(v2.c(), N::from_real(v2.s())));
diagonal[start + 0] = s[0];
diagonal[start] = s[0];
diagonal[start + 1] = s[1];
off_diagonal[start] = N::RealField::zero();

View File

@ -192,7 +192,7 @@ where
let eigvals = m.eigenvalues().unwrap();
let basis = Vector2::new(eigvals.x - diag[start + 1], off_diag[start]);
diag[start + 0] = eigvals[0];
diag[start] = eigvals[0];
diag[start + 1] = eigvals[1];
if let Some(ref mut q) = q {