Simplify SVD recompose pattern match

This commit is contained in:
João Costa 2018-10-09 21:21:00 +01:00 committed by Sébastien Crozet
parent 8b1aa2078c
commit 7a95644a21
1 changed files with 1 additions and 4 deletions

View File

@ -490,10 +490,7 @@ where
/// computed at construction-time.
pub fn recompose(self) -> Result<MatrixMN<N, R, C>, &'static str> {
match (self.u, self.v_t) {
(Some(_u), Some(_v_t)) => {
let mut u = _u;
let v_t = _v_t;
(Some(mut u), Some(v_t)) => {
for i in 0..self.singular_values.len() {
let val = self.singular_values[i];
u.column_mut(i).mul_assign(val);