@Test public void testColumn() { byte[][] data = QuadraticArrays.parse( "000000000", "111111111", "222222222", "333333333", "444444444", "555555555", "666666666", "777777777", "888888888" ); GameMatrixImpl matrix = new GameMatrixImpl(); matrix.setAll(data); byte[] target = new byte[9]; for (int i=0; i < GameMatrix.SIZE; i++) { for (int j=0; j < GameMatrix.SIZE; j++) { matrix.column(i, target); List<Integer> vals = Utility.toIntList(target); assertEquals(Arrays.asList(0,1,2,3,4,5,6,7,8), vals); } } }
protected final void column(final int index, final byte[] target) { assert target.length == SIZE; for (int i = 0; i < SIZE; i++) { target[i] = data[i][index]; } }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { protected final void column(final int index, final byte[] target) { assert target.length == SIZE; for (int i = 0; i < SIZE; i++) { target[i] = data[i][index]; } } }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { protected final void column(final int index, final byte[] target) { assert target.length == SIZE; for (int i = 0; i < SIZE; i++) { target[i] = data[i][index]; } } GameMatrixImpl(); }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { protected final void column(final int index, final byte[] target) { assert target.length == SIZE; for (int i = 0; i < SIZE; i++) { target[i] = data[i][index]; } } GameMatrixImpl(); @Override final void setAll(final byte[][] initializationData); @Override final void clear(); @Override final byte get(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override final byte[][] getArray(); @Override final String toString(); @Override int hashCode(); @Override final boolean equals(final Object obj); @Override Object clone(); @Override final boolean isValid(); @Override int getFreeMask(
            final int row,
            final int column); @Override final boolean canSet(
            final int row,
            final int column,
            final byte value); }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { protected final void column(final int index, final byte[] target) { assert target.length == SIZE; for (int i = 0; i < SIZE; i++) { target[i] = data[i][index]; } } GameMatrixImpl(); @Override final void setAll(final byte[][] initializationData); @Override final void clear(); @Override final byte get(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override final byte[][] getArray(); @Override final String toString(); @Override int hashCode(); @Override final boolean equals(final Object obj); @Override Object clone(); @Override final boolean isValid(); @Override int getFreeMask(
            final int row,
            final int column); @Override final boolean canSet(
            final int row,
            final int column,
            final byte value);  }