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

MeshTest2() private method

private MeshTest2 ( ) : void
return void
        public void MeshTest2()
        {
            // The Mesh method generates all possible (x,y) pairs
            // between two vector of points. For example, let's
            // suppose we have the values:
            //
            double[] a = { 0, 1 };
            double[] b = { 0, 1 };

            // We can create a grid as
            double[][] grid = a.Mesh(b);

            // result will be:
            //
            double[][] expected =
            {
                new double[] { 0, 0 },
                new double[] { 0, 1 },
                new double[] { 1, 0 },
                new double[] { 1, 1 },
            };

            Assert.IsTrue(expected.IsEqual(grid));
        }
MatrixTest