Run: cargo clippy --fix -Z unstable-options and cargo fmt

This commit is contained in:
Luis Moreno
2020-11-08 19:39:11 -04:00
parent 8281a1620e
commit 860056c3ba
48 changed files with 367 additions and 395 deletions
+7 -9
View File
@@ -63,10 +63,10 @@ impl<T: RealNumber, M: BaseMatrix<T>> LU<T, M> {
}
LU {
LU: LU,
pivot: pivot,
pivot_sign: pivot_sign,
singular: singular,
LU,
pivot,
pivot_sign,
singular,
phantom: PhantomData,
}
}
@@ -220,10 +220,10 @@ pub trait LUDecomposableMatrix<T: RealNumber>: BaseMatrix<T> {
let kmax = usize::min(i, j);
let mut s = T::zero();
for k in 0..kmax {
s = s + self.get(i, k) * LUcolj[k];
s += self.get(i, k) * LUcolj[k];
}
LUcolj[i] = LUcolj[i] - s;
LUcolj[i] -= s;
self.set(i, j, LUcolj[i]);
}
@@ -239,9 +239,7 @@ pub trait LUDecomposableMatrix<T: RealNumber>: BaseMatrix<T> {
self.set(p, k, self.get(j, k));
self.set(j, k, t);
}
let k = piv[p];
piv[p] = piv[j];
piv[j] = k;
piv.swap(p, j);
pivsign = -pivsign;
}