vector vector_a={0,1,2,3,4,5};
vector vector_b={0,1,2,3,4,5,6};
Print("vector_a.Outer\n",vector_a.Outer(vector_b));
Print("vector_a.Kron\n",vector_a.Kron(vector_b));
matrix matrix_a={{0,1,2},{3,4,5}};
matrix matrix_b={{0,1,2},{3,4,5},{6,7,8}};
Print("matrix_a.Outer\n",matrix_a.Outer(matrix_b));
Print("matrix_a.Kron\n",matrix_a.Kron(matrix_b));
/*
vector_a.Outer
[[0,0,0,0,0,0,0]
[0,1,2,3,4,5,6]
[0,2,4,6,8,10,12]
[0,3,6,9,12,15,18]
[0,4,8,12,16,20,24]
[0,5,10,15,20,25,30]]
vector_a.Kron
[[0,0,0,0,0,0,0,0,1,2,3,4,5,6,0,2,4,6,8,10,12,0,3,6,9,12,15,18,0,4,8,12,16,20,24,0,5,10,15,20,25,30]]
matrix_a.Outer
[[0,0,0,0,0,0,0,0,0]
[0,1,2,3,4,5,6,7,8]
[0,2,4,6,8,10,12,14,16]
[0,3,6,9,12,15,18,21,24]
[0,4,8,12,16,20,24,28,32]
[0,5,10,15,20,25,30,35,40]]
matrix_a.Kron
[[0,0,0,0,1,2,0,2,4]
[0,0,0,3,4,5,6,8,10]
[0,0,0,6,7,8,12,14,16]
[0,3,6,0,4,8,0,5,10]
[9,12,15,12,16,20,15,20,25]
[18,21,24,24,28,32,30,35,40]]
*/
|