Eigen::KroneckerProduct< Lhs, Rhs > Class Template Reference

Kronecker tensor product helper class for dense matrices. More...

+ Inheritance diagram for Eigen::KroneckerProduct< Lhs, Rhs >:

Public Member Functions

template<typename Dest >
void evalTo (Dest &dst) const
 Evaluate the Kronecker tensor product. More...
 
 KroneckerProduct (const Lhs &A, const Rhs &B)
 Constructor. More...
 
- Public Member Functions inherited from Eigen::KroneckerProductBase< KroneckerProduct< Lhs, Rhs > >
Scalar coeff (Index i) const
 
Scalar coeff (Index row, Index col) const
 
Index cols () const
 
 KroneckerProductBase (const Lhs &A, const Rhs &B)
 Constructor. More...
 
Index rows () const
 
- Public Member Functions inherited from Eigen::ReturnByValue< class >
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
void evalTo (Dest &dst) const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 

Private Types

typedef KroneckerProductBase< KroneckerProductBase
 

Additional Inherited Members

- Public Types inherited from Eigen::ReturnByValue< class >
typedef internal::dense_xpr_base< ReturnByValue >::type Base
 
typedef internal::traits< Derived >::ReturnType ReturnType
 
- Protected Types inherited from Eigen::KroneckerProductBase< KroneckerProduct< Lhs, Rhs > >
typedef Traits::Lhs Lhs
 
typedef Traits::Rhs Rhs
 
- Protected Attributes inherited from Eigen::KroneckerProductBase< KroneckerProduct< Lhs, Rhs > >
Lhs::Nested m_A
 
Rhs::Nested m_B
 

Detailed Description

template<typename Lhs, typename Rhs>
class Eigen::KroneckerProduct< Lhs, Rhs >

Kronecker tensor product helper class for dense matrices.

This class is the return value of kroneckerProduct(MatrixBase, MatrixBase). Use the function rather than construct this class directly to avoid specifying template prarameters.

Template Parameters
LhsType of the left-hand side, a matrix expression.
RhsType of the rignt-hand side, a matrix expression.

Definition at line 84 of file KroneckerTensorProduct.h.

Member Typedef Documentation

◆ Base

template<typename Lhs , typename Rhs >
typedef KroneckerProductBase<KroneckerProduct> Eigen::KroneckerProduct< Lhs, Rhs >::Base
private

Definition at line 87 of file KroneckerTensorProduct.h.

Constructor & Destructor Documentation

◆ KroneckerProduct()

template<typename Lhs , typename Rhs >
Eigen::KroneckerProduct< Lhs, Rhs >::KroneckerProduct ( const Lhs A,
const Rhs B 
)
inline

Constructor.

Definition at line 93 of file KroneckerTensorProduct.h.

94  : Base(A, B)
95  {}
KroneckerProductBase< KroneckerProduct > Base

Member Function Documentation

◆ evalTo()

template<typename Lhs , typename Rhs >
template<typename Dest >
void Eigen::KroneckerProduct< Lhs, Rhs >::evalTo ( Dest &  dst) const

Evaluate the Kronecker tensor product.

Definition at line 136 of file KroneckerTensorProduct.h.

137 {
138  const int BlockRows = Rhs::RowsAtCompileTime,
139  BlockCols = Rhs::ColsAtCompileTime;
140  const Index Br = m_B.rows(),
141  Bc = m_B.cols();
142  for (Index i=0; i < m_A.rows(); ++i)
143  for (Index j=0; j < m_A.cols(); ++j)
144  Block<Dest,BlockRows,BlockCols>(dst,i*Br,j*Bc,Br,Bc) = m_A.coeff(i,j) * m_B;
145 }
int i
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
std::ptrdiff_t j

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