示例#1
0
        public void Case7_Extended()
        {
            var shape = new Shape(2);
            var sh    = new NDExtendedCoordinatesIncrementor(shape, 2);

            sh.Index.Should().ContainInOrder(0);
            sh.Next().Should().ContainInOrder(1);

            sh.Next().Should().BeNull();
        }
示例#2
0
        public void Case8_Extended()
        {
            var shape = new Shape(100);
            var sh    = new NDExtendedCoordinatesIncrementor(shape, 2);

            sh.Index.Should().ContainInOrder(0, 0, 0);
            sh.Next().Should().ContainInOrder(1, 0, 0);
            sh.Index[2] = 1;
            sh.Next().Should().ContainInOrder(2, 0, 1);
        }
示例#3
0
        public void Case10_Scalar_Extended()
        {
            var shape = Shape.Scalar;
            var sh    = new NDExtendedCoordinatesIncrementor(shape, 2);

            sh.Index.Should().ContainInOrder(0, 0, 0);
            sh.Next().Should().BeNull();
        }
示例#4
0
        public void Case1_Extended()
        {
            var shape = new Shape(3, 3, 1, 2);
            var sh    = new NDExtendedCoordinatesIncrementor(shape, 2);

            sh.Index[5] = 55;
            sh.Index.Should().ContainInOrder(0, 0, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(0, 0, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(0, 1, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(0, 1, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(0, 2, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(0, 2, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(1, 0, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(1, 0, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(1, 1, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(1, 1, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(1, 2, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(1, 2, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(2, 0, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(2, 0, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(2, 1, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(2, 1, 0, 1, 0, 55);
            sh.Next().Should().ContainInOrder(2, 2, 0, 0, 0, 55);
            sh.Next().Should().ContainInOrder(2, 2, 0, 1, 0, 55);

            sh.Next().Should().BeNull();
        }