pub trait KroneckerMul<Rhs>: Matrixwhere
    Rhs: Matrix,
    Self::Output: Matrix,
{ type Output; fn kronecker_mul(self, rhs: Rhs) -> Self::Output; }

Required Associated Types§

Required Methods§

Returns the kronecker product of the two matrices

A ⊗ₖᵣₒₙ B

Arguments
  • rhs - A matrix of any size
Examples
let a = [
    [1.0, 2.0],
    [3.0, 4.0]
];
let b = [
    [1.0, 2.0],
    [3.0, 4.0]
];
let ab = [
    [1.0, 2.0, 2.0, 4.0],
    [3.0, 4.0, 6.0, 8.0],
    [3.0, 6.0, 4.0, 8.0],
    [9.0, 12.0, 12.0, 16.0]
];
assert_eq!(a.kronecker(b), ab);

Implementations on Foreign Types§

Implementors§