Eigen::SPQR_QProduct< SPQRType, Derived > Struct Template Reference
+ Inheritance diagram for Eigen::SPQR_QProduct< SPQRType, Derived >:

Public Types

typedef SPQRType::Scalar Scalar
 
typedef SPQRType::StorageIndex StorageIndex
 
- Public Types inherited from Eigen::ReturnByValue< SPQR_QProduct< SPQRType, Derived > >
typedef internal::dense_xpr_base< ReturnByValue >::type Base
 
typedef internal::traits< SPQR_QProduct< SPQRType, Derived > >::ReturnType ReturnType
 

Public Member Functions

Index cols () const
 
template<typename ResType >
void evalTo (ResType &res) const
 
Index rows () const
 
 SPQR_QProduct (const SPQRType &spqr, const Derived &other, bool transpose)
 
- Public Member Functions inherited from Eigen::ReturnByValue< SPQR_QProduct< SPQRType, Derived > >
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
void evalTo (Dest &dst) const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 

Public Attributes

const Derived & m_other
 
const SPQRType & m_spqr
 
bool m_transpose
 

Detailed Description

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

Definition at line 277 of file SuiteSparseQRSupport.h.

Member Typedef Documentation

◆ Scalar

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

Definition at line 279 of file SuiteSparseQRSupport.h.

◆ StorageIndex

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

Definition at line 280 of file SuiteSparseQRSupport.h.

Constructor & Destructor Documentation

◆ SPQR_QProduct()

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

Definition at line 282 of file SuiteSparseQRSupport.h.

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

Member Function Documentation

◆ cols()

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

Definition at line 285 of file SuiteSparseQRSupport.h.

285 { return m_other.cols(); }

◆ evalTo()

template<typename SPQRType , typename Derived >
template<typename ResType >
void Eigen::SPQR_QProduct< SPQRType, Derived >::evalTo ( ResType &  res) const
inline

Definition at line 288 of file SuiteSparseQRSupport.h.

289  {
290  cholmod_dense y_cd;
291  cholmod_dense *x_cd;
292  int method = m_transpose ? SPQR_QTX : SPQR_QX;
293  cholmod_common *cc = m_spqr.cholmodCommon();
294  y_cd = viewAsCholmod(m_other.const_cast_derived());
295  x_cd = SuiteSparseQR_qmult<Scalar>(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc);
296  res = Matrix<Scalar,ResType::RowsAtCompileTime,ResType::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x), x_cd->nrow, x_cd->ncol);
297  cholmod_l_free_dense(&x_cd, cc);
298  }
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
cholmod_sparse viewAsCholmod(Ref< SparseMatrix< Scalar_, Options_, StorageIndex_ > > mat)

◆ rows()

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

Definition at line 284 of file SuiteSparseQRSupport.h.

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

Member Data Documentation

◆ m_other

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

Definition at line 300 of file SuiteSparseQRSupport.h.

◆ m_spqr

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

Definition at line 299 of file SuiteSparseQRSupport.h.

◆ m_transpose

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

Definition at line 301 of file SuiteSparseQRSupport.h.


The documentation for this struct was generated from the following file: