/** {@inheritDoc} */
 @Override
 protected void checkState(final int step, final MatrixIteration2DState state) {
   super.checkState(step, state);
   Assert.assertEquals(1, state.getSourceMatrixCount());
   Assert.assertEquals(0, state.getSourceMatrixIndex(0));
 }
  /** {@inheritDoc} */
  @Override
  protected void checkState(final int step, final MatrixIteration2DState state) {
    super.checkState(step, state);

    switch (step) {
      case 0:
        {
          Assert.assertEquals(1, state.getSourceMatrixCount());
          Assert.assertEquals(0, state.getSourceMatrixIndex(0));
          return;
        }
      case 1:
        {
          Assert.assertEquals(2, state.getSourceMatrixCount());
          Assert.assertEquals(0, state.getSourceMatrixIndex(0));
          Assert.assertEquals(1, state.getSourceMatrixIndex(1));
          return;
        }
      case 2:
        {
          Assert.assertEquals(3, state.getSourceMatrixCount());
          Assert.assertEquals(0, state.getSourceMatrixIndex(0));
          Assert.assertEquals(1, state.getSourceMatrixIndex(1));
          Assert.assertEquals(2, state.getSourceMatrixIndex(2));
          return;
        }
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      case 12:
        {
          Assert.assertEquals(4, state.getSourceMatrixCount());
          Assert.assertEquals(0, state.getSourceMatrixIndex(0));
          Assert.assertEquals(1, state.getSourceMatrixIndex(1));
          Assert.assertEquals(2, state.getSourceMatrixIndex(2));
          Assert.assertEquals(3, state.getSourceMatrixIndex(3));
          return;
        }
      case 13:
        {
          Assert.assertEquals(3, state.getSourceMatrixCount());
          Assert.assertEquals(1, state.getSourceMatrixIndex(0));
          Assert.assertEquals(2, state.getSourceMatrixIndex(1));
          Assert.assertEquals(3, state.getSourceMatrixIndex(2));
          return;
        }
      case 14:
        {
          Assert.assertEquals(2, state.getSourceMatrixCount());
          Assert.assertEquals(2, state.getSourceMatrixIndex(0));
          Assert.assertEquals(3, state.getSourceMatrixIndex(1));
          return;
        }
      case 15:
        {
          Assert.assertEquals(1, state.getSourceMatrixCount());
          Assert.assertEquals(3, state.getSourceMatrixIndex(0));
          return;
        }
      default:
        {
          throw new AssertionError("Only sixteen steps allowed."); // $NON-NLS-1$
        }
    }
  }