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

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

#include <KroneckerTensorProduct.h>

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

Public Member Functions

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

Private Types

typedef KroneckerProductBase< KroneckerProductBase
 

Additional Inherited Members

- Public Types inherited from Eigen::ReturnByValue< Derived >
typedef internal::traits< Derived >::ReturnType ReturnType
 
typedef internal::dense_xpr_base< ReturnByValue >::type Base
 
- 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.

Member Typedef Documentation

◆ Base

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

Constructor & Destructor Documentation

◆ KroneckerProduct()

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

Constructor.

87 : Base(A, B) {}
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
KroneckerProductBase< KroneckerProduct > Base
Definition: KroneckerTensorProduct.h:81
Definition: matrices.h:74

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.

127  {
128  const int BlockRows = Rhs::RowsAtCompileTime, BlockCols = Rhs::ColsAtCompileTime;
129  const Index Br = m_B.rows(), Bc = m_B.cols();
130  for (Index i = 0; i < m_A.rows(); ++i)
131  for (Index j = 0; j < m_A.cols(); ++j)
132  Block<Dest, BlockRows, BlockCols>(dst, i * Br, j * Bc, Br, Bc) = m_A.coeff(i, j) * m_B;
133 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Rhs::Nested m_B
Definition: KroneckerTensorProduct.h:63
Lhs::Nested m_A
Definition: KroneckerTensorProduct.h:62
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References i, and j.


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