Reduce explicit zeros when applying SparseQR's matrix Q
diff --git a/Eigen/src/SparseQR/SparseQR.h b/Eigen/src/SparseQR/SparseQR.h index e9b2a6b..267c48b 100644 --- a/Eigen/src/SparseQR/SparseQR.h +++ b/Eigen/src/SparseQR/SparseQR.h
@@ -573,6 +573,7 @@ { Scalar tau = Scalar(0); tau = m_qr.m_Q.col(k).dot(res.col(j)); + if(tau==Scalar(0)) continue; tau = tau * m_qr.m_hcoeffs(k); res.col(j) -= tau * m_qr.m_Q.col(k); } @@ -588,6 +589,7 @@ { Scalar tau = Scalar(0); tau = m_qr.m_Q.col(k).dot(res.col(j)); + if(tau==Scalar(0)) continue; tau = tau * m_qr.m_hcoeffs(k); res.col(j) -= tau * m_qr.m_Q.col(k); }