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(); }
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); }
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(); }
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(); }