MOAB  4.9.3pre
Eigen::SparseQR_QProduct< SparseQRType, Derived > Struct Template Reference

#include <SparseQR.h>

Inheritance diagram for Eigen::SparseQR_QProduct< SparseQRType, Derived >:
Collaboration diagram for Eigen::SparseQR_QProduct< SparseQRType, Derived >:

List of all members.

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

Detailed Description

template<typename SparseQRType, typename Derived>
struct Eigen::SparseQR_QProduct< SparseQRType, Derived >

Definition at line 600 of file SparseQR.h.


Member Typedef Documentation

template<typename SparseQRType, typename Derived>
typedef SparseQRType::QRMatrixType Eigen::SparseQR_QProduct< SparseQRType, Derived >::MatrixType

Definition at line 602 of file SparseQR.h.

template<typename SparseQRType, typename Derived>
typedef SparseQRType::Scalar Eigen::SparseQR_QProduct< SparseQRType, Derived >::Scalar

Definition at line 603 of file SparseQR.h.


Constructor & Destructor Documentation

template<typename SparseQRType, typename Derived>
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) {}

Member Function Documentation

template<typename SparseQRType, typename Derived>
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(); }
template<typename SparseQRType, typename Derived>
template<typename DesType >
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);
        }
      }
    }
  }
template<typename SparseQRType, typename Derived>
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(); }

Member Data Documentation

template<typename SparseQRType, typename Derived>
const Derived& Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_other

Definition at line 652 of file SparseQR.h.

template<typename SparseQRType, typename Derived>
const SparseQRType& Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_qr

Definition at line 651 of file SparseQR.h.

template<typename SparseQRType, typename Derived>
bool Eigen::SparseQR_QProduct< SparseQRType, Derived >::m_transpose

Definition at line 653 of file SparseQR.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines