MCPcopy Create free account
hub / github.com/abess-team/abess / evalTo

Method evalTo

python/include/Eigen/src/SparseQR/SparseQR.h:612–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610 // Assign to a vector
611 template<typename DesType>
612 void evalTo(DesType& res) const
613 {
614 Index m = m_qr.rows();
615 Index n = m_qr.cols();
616 Index diagSize = (std::min)(m,n);
617 res = m_other;
618 if (m_transpose)
619 {
620 eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes");
621 //Compute res = Q' * other column by column
622 for(Index j = 0; j < res.cols(); j++){
623 for (Index k = 0; k < diagSize; k++)
624 {
625 Scalar tau = Scalar(0);
626 tau = m_qr.m_Q.col(k).dot(res.col(j));
627 if(tau==Scalar(0)) continue;
628 tau = tau * m_qr.m_hcoeffs(k);
629 res.col(j) -= tau * m_qr.m_Q.col(k);
630 }
631 }
632 }
633 else
634 {
635 eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes");
636 // Compute res = Q * other column by column
637 for(Index j = 0; j < res.cols(); j++)
638 {
639 for (Index k = diagSize-1; k >=0; k--)
640 {
641 Scalar tau = Scalar(0);
642 tau = m_qr.m_Q.col(k).dot(res.col(j));
643 if(tau==Scalar(0)) continue;
644 tau = tau * m_qr.m_hcoeffs(k);
645 res.col(j) -= tau * m_qr.m_Q.col(k);
646 }
647 }
648 }
649 }
650
651 const SparseQRType& m_qr;
652 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 4

rowsMethod · 0.45
colsMethod · 0.45
dotMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected