kron#
Perform a Kronecker product of two operators
-
template<typename T1, typename T2>
auto __MATX_INLINE__ matx::kron(const T1 &a, const T2 &b)# Kronecker tensor product
The Kronecker tensor product is formed by the matrix b by ever element in the matrix a. The resulting matrix has the number of rows and columns equal to the product of the rows and columns of matrices a and b, respectively.
- Template Parameters:
T1 – Type of first input
T2 – Type of second input
- Parameters:
a – Operator or view for first input
b – Operator or view for second input
- Returns:
New operator of the kronecker product
Examples#
auto bv = make_tensor<dtype>({2, 2});
auto ov = make_tensor<dtype>({8, 8});
bv.SetVals({{1, -1}, {-1, 1}});
(ov = kron(eye({4, 4}), bv)).run(exec);