MOAB  4.9.3pre
Eigen::SPQR_QProduct< SPQRType, Derived > Struct Template Reference

#include <SuiteSparseQRSupport.h>

Inheritance diagram for Eigen::SPQR_QProduct< SPQRType, Derived >:
Collaboration diagram for Eigen::SPQR_QProduct< SPQRType, Derived >:

List of all members.

Public Types

typedef SPQRType::Scalar Scalar
typedef SPQRType::StorageIndex StorageIndex

Public Member Functions

 SPQR_QProduct (const SPQRType &spqr, const Derived &other, bool transpose)
Index rows () const
Index cols () const
template<typename ResType >
void evalTo (ResType &res) const

Public Attributes

const SPQRType & m_spqr
const Derived & m_other
bool m_transpose

Detailed Description

template<typename SPQRType, typename Derived>
struct Eigen::SPQR_QProduct< SPQRType, Derived >

Definition at line 252 of file SuiteSparseQRSupport.h.


Member Typedef Documentation

template<typename SPQRType, typename Derived>
typedef SPQRType::Scalar Eigen::SPQR_QProduct< SPQRType, Derived >::Scalar

Definition at line 254 of file SuiteSparseQRSupport.h.

template<typename SPQRType, typename Derived>
typedef SPQRType::StorageIndex Eigen::SPQR_QProduct< SPQRType, Derived >::StorageIndex

Definition at line 255 of file SuiteSparseQRSupport.h.


Constructor & Destructor Documentation

template<typename SPQRType, typename Derived>
Eigen::SPQR_QProduct< SPQRType, Derived >::SPQR_QProduct ( const SPQRType &  spqr,
const Derived &  other,
bool  transpose 
) [inline]

Definition at line 257 of file SuiteSparseQRSupport.h.

: m_spqr(spqr),m_other(other),m_transpose(transpose) {}

Member Function Documentation

template<typename SPQRType, typename Derived>
Index Eigen::SPQR_QProduct< SPQRType, Derived >::cols ( void  ) const [inline]

Reimplemented from Eigen::ReturnByValue< SPQR_QProduct< SPQRType, Derived > >.

Definition at line 260 of file SuiteSparseQRSupport.h.

{ return m_other.cols(); }
template<typename SPQRType, typename Derived>
template<typename ResType >
void Eigen::SPQR_QProduct< SPQRType, Derived >::evalTo ( ResType &  res) const [inline]

Definition at line 263 of file SuiteSparseQRSupport.h.

  {
    cholmod_dense y_cd;
    cholmod_dense *x_cd; 
    int method = m_transpose ? SPQR_QTX : SPQR_QX; 
    cholmod_common *cc = m_spqr.cholmodCommon();
    y_cd = viewAsCholmod(m_other.const_cast_derived());
    x_cd = SuiteSparseQR_qmult<Scalar>(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc);
    res = Matrix<Scalar,ResType::RowsAtCompileTime,ResType::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x), x_cd->nrow, x_cd->ncol);
    cholmod_l_free_dense(&x_cd, cc);
  }
template<typename SPQRType, typename Derived>
Index Eigen::SPQR_QProduct< SPQRType, Derived >::rows ( void  ) const [inline]

Reimplemented from Eigen::ReturnByValue< SPQR_QProduct< SPQRType, Derived > >.

Definition at line 259 of file SuiteSparseQRSupport.h.

{ return m_transpose ? m_spqr.rows() : m_spqr.cols(); }

Member Data Documentation

template<typename SPQRType, typename Derived>
const Derived& Eigen::SPQR_QProduct< SPQRType, Derived >::m_other

Definition at line 275 of file SuiteSparseQRSupport.h.

template<typename SPQRType, typename Derived>
const SPQRType& Eigen::SPQR_QProduct< SPQRType, Derived >::m_spqr

Definition at line 274 of file SuiteSparseQRSupport.h.

template<typename SPQRType, typename Derived>
bool Eigen::SPQR_QProduct< SPQRType, Derived >::m_transpose

Definition at line 276 of file SuiteSparseQRSupport.h.


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