MOAB
4.9.3pre
|
#include <SparseQR.h>
Public Types | |
typedef SparseQRType::QRMatrixType | MatrixType |
typedef SparseQRType::Scalar | Scalar |
Public Member Functions | |
SparseQR_QProduct (const SparseQRType &qr, const Derived &other, bool transpose) | |
Index | rows () const |
Index | cols () const |
template<typename DesType > | |
void | evalTo (DesType &res) const |
Public Attributes | |
const SparseQRType & | m_qr |
const Derived & | m_other |
bool | m_transpose |
Definition at line 600 of file SparseQR.h.
typedef SparseQRType::QRMatrixType Eigen::SparseQR_QProduct< SparseQRType, Derived >::MatrixType |
Definition at line 602 of file SparseQR.h.
typedef SparseQRType::Scalar Eigen::SparseQR_QProduct< SparseQRType, Derived >::Scalar |
Definition at line 603 of file SparseQR.h.
Eigen::SparseQR_QProduct< SparseQRType, Derived >::SparseQR_QProduct | ( | const SparseQRType & | qr, |
const Derived & | other, | ||
bool | transpose | ||
) | [inline] |
Definition at line 605 of file SparseQR.h.
: m_qr(qr),m_other(other),m_transpose(transpose) {}
Index Eigen::SparseQR_QProduct< SparseQRType, Derived >::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::ReturnByValue< SparseQR_QProduct< SparseQRType, Derived > >.
Definition at line 608 of file SparseQR.h.
{ return m_other.cols(); }
void Eigen::SparseQR_QProduct< SparseQRType, Derived >::evalTo | ( | DesType & | res | ) | const [inline] |
Definition at line 612 of file SparseQR.h.
{ Index m = m_qr.rows(); Index n = m_qr.cols(); Index diagSize = (std::min)(m,n); res = m_other; if (m_transpose) { eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes"); //Compute res = Q' * other column by column for(Index j = 0; j < res.cols(); j++){ for (Index k = 0; k < diagSize; k++) { 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); } } } else { eigen_assert(m_qr.m_Q.rows() == m_other.rows() && "Non conforming object sizes"); // Compute res = Q * other column by column for(Index j = 0; j < res.cols(); j++) { for (Index k = diagSize-1; k >=0; k--) { 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); } } } }
Index Eigen::SparseQR_QProduct< SparseQRType, Derived >::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::ReturnByValue< SparseQR_QProduct< SparseQRType, Derived > >.
Definition at line 607 of file SparseQR.h.
{ return m_transpose ? m_qr.rows() : m_qr.cols(); }
const Derived& Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_other |
Definition at line 652 of file SparseQR.h.
const SparseQRType& Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_qr |
Definition at line 651 of file SparseQR.h.
bool Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_transpose |
Definition at line 653 of file SparseQR.h.