$treeview $search $mathjax
$projectbrief
$projectbrief
$searchbox

KroneckerProduct module

Functions

template<typename A , typename B >
KroneckerProductSparse< A, B > kroneckerProduct (const EigenBase< A > &a, const EigenBase< B > &b)
template<typename A , typename B >
KroneckerProduct< A, B > kroneckerProduct (const MatrixBase< A > &a, const MatrixBase< B > &b)

Detailed Description

This module contains an experimental Kronecker product implementation.

 #include <Eigen/KroneckerProduct>

Function Documentation

KroneckerProductSparse<A,B> Eigen::kroneckerProduct ( const EigenBase< A > &  a,
const EigenBase< B > &  b 
) [inline]

Computes Kronecker tensor product of two matrices, at least one of which is sparse

Parameters:
a Dense/sparse matrix a
b Dense/sparse matrix b
Returns:
Kronecker tensor product of a and b, stored in a sparse matrix
KroneckerProduct<A,B> Eigen::kroneckerProduct ( const MatrixBase< A > &  a,
const MatrixBase< B > &  b 
) [inline]

Computes Kronecker tensor product of two dense matrices

Warning:
If you want to replace a matrix by its Kronecker product with some matrix, do NOT do this:
 A = kroneckerProduct(A,B); // bug!!! caused by aliasing effect
instead, use eval() to work around this:
 A = kroneckerProduct(A,B).eval();
Parameters:
a Dense matrix a
b Dense matrix b
Returns:
Kronecker tensor product of a and b