- or download this
A = [ 1 2 ]
[ 3 4 ]
...
[ 7 8 14 16 ]
[ 15 18 20 24 ]
[ 21 24 28 32 ]
- or download this
#!/usr/bin/perl
use strict;
use warnings;
...
}
return $kron;
}
- or download this
[ 1 2 ]
[ 3 4 ]
- or download this
[ 1 1 ] [ 2 2 ]
[ 1 1 ] [ 2 2 ]
[ 3 3 ] [ 4 4 ]
[ 3 3 ] [ 4 4 ]
- or download this
[ 5 6 ] [ 10 12 ]
[ 7 8 ] [ 14 16 ]
[ 15 18 ] [ 20 24 ]
[ 21 24 ] [ 28 32 ]
- or download this
sub kronecker_product {
my ($x, $y) = @_;
...
$y * $x->dummy(0, $y0)->dummy(1, $y1)
)->xchg(1, 2)->reshape($x0 * $y0, $x1 * $y1)
}