MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / evalTo

Method evalTo

include/Eigen/src/SparseQR/SparseQR.h:592–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590 // Assign to a vector
591 template <typename DesType>
592 void evalTo(DesType& res) const {
593 Index m = m_qr.rows();
594 Index n = m_qr.cols();
595 Index diagSize = (std::min)(m, n);
596 res = m_other;
597 if (m_transpose) {
598 eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes");
599 // Compute res = Q' * other column by column
600 for (Index j = 0; j < res.cols(); j++) {
601 for (Index k = 0; k < diagSize; k++) {
602 Scalar tau = Scalar(0);
603 tau = m_qr.m_Q.col(k).dot(res.col(j));
604 if (tau == Scalar(0)) continue;
605 tau = tau * m_qr.m_hcoeffs(k);
606 res.col(j) -= tau * m_qr.m_Q.col(k);
607 }
608 }
609 } else {
610 eigen_assert(m_qr.matrixQ().cols() == m_other.rows() && "Non conforming object sizes");
611
612 res.conservativeResize(rows(), cols());
613
614 // Compute res = Q * other column by column
615 for (Index j = 0; j < res.cols(); j++) {
616 Index start_k = internal::is_identity<Derived>::value ? numext::mini(j, diagSize - 1) : diagSize - 1;
617 for (Index k = start_k; k >= 0; k--) {
618 Scalar tau = Scalar(0);
619 tau = m_qr.m_Q.col(k).dot(res.col(j));
620 if (tau == Scalar(0)) continue;
621 tau = tau * numext::conj(m_qr.m_hcoeffs(k));
622 res.col(j) -= tau * m_qr.m_Q.col(k);
623 }
624 }
625 }
626 }
627
628 const SparseQRType& m_qr;
629 const Derived& m_other;

Callers 6

runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 10

miniFunction · 0.85
conjFunction · 0.85
rowsFunction · 0.50
colsFunction · 0.50
rowsMethod · 0.45
colsMethod · 0.45
dotMethod · 0.45
colMethod · 0.45
matrixQMethod · 0.45
conservativeResizeMethod · 0.45

Tested by

no test coverage detected