public void TestLengthEqualToBreadth() { var generator = new CircularIndexGenerator(2, 0, 2, Order.Upwards); CheckSequence(generator, 0, 1); generator = new CircularIndexGenerator(2, 1, 2, Order.Downwards); CheckSequence(generator, 1, 0); }
public DimensionDescription Generate() { IndexGenerator indexGenerator; if (Mode == TraverseMode.Serpentine) indexGenerator = new SequenceIndexGenerator(Length, Start, Breadth, StartSubOrder); else if (Mode == TraverseMode.Circular) indexGenerator = new CircularIndexGenerator(Length, Start, Breadth, StartSubOrder); else throw new InvalidOperationException(); return new DimensionDescription(Length, Assignment, indexGenerator); }
private static DimensionDescription CreateIncrementDescriptionCircular(int max, DimensionAssignment assignment) { var generator = new CircularIndexGenerator(max, 0); return new DimensionDescription(max, assignment, generator); }
public void TestOddUpwards2SubUpwards() { var generator = new CircularIndexGenerator(5, 0, 2, Order.Upwards); CheckSequence(generator, 0, 1, 4, 3, null, 2); }
public void TestOddUpwards2SubDownwards() { var generator = new CircularIndexGenerator(5, 1, 2, Order.Downwards); CheckSequence(generator, 1, 0, 3, 4, 2, null); }
public void TestOddStartWithUpper() { var generator = new CircularIndexGenerator(3, 2); CheckSequence(generator, 2, 0, 1); }
public void TestOddStartWithLower() { var generator = new CircularIndexGenerator(3, 0); CheckSequence(generator, 0, 2, 1); }
public void TestEvenUpwards2SubUpwards() { var generator = new CircularIndexGenerator(4, 0, 2, Order.Upwards); CheckSequence(generator, 0, 1, 3, 2); }
public void TestEvenUpwards2SubDownwards() { var generator = new CircularIndexGenerator(4, 1, 2, Order.Downwards); CheckSequence(generator, 1, 0, 2, 3); }
public void TestEvenStartWithUpper() { var generator = new CircularIndexGenerator(4, 3); CheckSequence(generator, 3, 0, 2, 1); }
public void TestEvenStartWithLower() { var generator = new CircularIndexGenerator(4, 0); CheckSequence(generator, 0, 3, 1, 2); }
public void TestEvenDownwards2SubUpwards() { var generator = new CircularIndexGenerator(4, 2, 2, Order.Upwards); CheckSequence(generator, 2, 3, 1, 0); }
public void TestStartSubOrderWithBreadthOf1() { var generator = new CircularIndexGenerator(2, 1, 1, Order.Upwards); CheckSequence(generator, 1, 0); generator = new CircularIndexGenerator(2, 1, 1, Order.Downwards); CheckSequence(generator, 1, 0); generator = new CircularIndexGenerator(2, 0, 1, Order.Upwards); CheckSequence(generator, 0, 1); generator = new CircularIndexGenerator(2, 0, 1, Order.Downwards); CheckSequence(generator, 0, 1); }