MatrixView extends AbstractMatrix { @Override public Vector getColumn(int column) { if (column < 0 || column >= columnSize()) { throw new IndexException(column, columnSize()); } return new VectorView(matrix.getColumn(column + offset[COL]), offset[ROW], rowSize()); } private  MatrixView();  MatrixView(Matrix matrix, int[] offset, int[] size); @Override Matrix clone(); @Override double getQuick(int row, int column); @Override Matrix like(); @Override Matrix like(int rows, int columns); @Override void setQuick(int row, int column, double value); @Override int[] getNumNondefaultElements(); @Override Matrix viewPart(int[] offset, int[] size); @Override Matrix assignColumn(int column, Vector other); @Override Matrix assignRow(int row, Vector other); @Override Vector getColumn(int column); @Override Vector getRow(int row);  }
@Test public void testGetColumn() { Vector column = test.getColumn(1); assertEquals("row size", 3, column.getNumNondefaultElements()); int i = 0; for (double x : new double[]{3.3, 5.5, 7.7}) { assertEquals(x, column.get(i++), 0); } }
@Test(expected = IndexException.class) public void testGetColumnIndexUnder() { test.getColumn(-1); }
@Test(expected = IndexException.class) public void testGetColumnIndexOver() { test.getColumn(5); }