Accord.Tests.Math.MatrixTest.TensorProductTest C# (CSharp) Method

TensorProductTest() private method

private TensorProductTest ( ) : void
return void
        public void TensorProductTest()
        {
            double[,] a = 
            {
                { 1, 2 },
                { 3, 4 },
            };

            double[,] b = 
            {
                { 0, 5 },
                { 6, 7 },
            };

            double[,] expected = 
            {
                {  0,  5,  0, 10 },
                {  6,  7, 12, 14 },
                {  0, 15,  0, 20 },
                { 18, 21, 24, 28 },
            };

            double[,] actual = Matrix.KroneckerProduct(a, b);
            Assert.IsTrue(Matrix.IsEqual(expected, actual));
        }
MatrixTest