BlockRealMatrix extends AbstractRealMatrix implements Serializable { @Override public void setColumnMatrix(final int column, final RealMatrix matrix) throws OutOfRangeException, MatrixDimensionMismatchException { try { setColumnMatrix(column, (BlockRealMatrix) matrix); } catch (ClassCastException cce) { super.setColumnMatrix(column, matrix); } } BlockRealMatrix(final int rows, final int columns);  BlockRealMatrix(final double[][] rawData);  BlockRealMatrix(final int rows, final int columns,
                           final double[][] blockData, final boolean copyArray); static double[][] toBlocksLayout(final double[][] rawData); static double[][] createBlocksLayout(final int rows, final int columns); @Override BlockRealMatrix createMatrix(final int rowDimension,
                                        final int columnDimension); @Override BlockRealMatrix copy(); @Override BlockRealMatrix add(final RealMatrix m); BlockRealMatrix add(final BlockRealMatrix m); @Override BlockRealMatrix subtract(final RealMatrix m); BlockRealMatrix subtract(final BlockRealMatrix m); @Override BlockRealMatrix scalarAdd(final double d); @Override RealMatrix scalarMultiply(final double d); @Override BlockRealMatrix multiply(final RealMatrix m); BlockRealMatrix multiply(BlockRealMatrix m); @Override double[][] getData(); @Override double getNorm(); @Override double getFrobeniusNorm(); @Override BlockRealMatrix getSubMatrix(final int startRow, final int endRow,
                                        final int startColumn,
                                        final int endColumn); @Override void setSubMatrix(final double[][] subMatrix, final int row,
                             final int column); @Override BlockRealMatrix getRowMatrix(final int row); @Override void setRowMatrix(final int row, final RealMatrix matrix); void setRowMatrix(final int row, final BlockRealMatrix matrix); @Override BlockRealMatrix getColumnMatrix(final int column); @Override void setColumnMatrix(final int column, final RealMatrix matrix); @Override RealVector getRowVector(final int row); @Override void setRowVector(final int row, final RealVector vector); @Override RealVector getColumnVector(final int column); @Override void setColumnVector(final int column, final RealVector vector); @Override double[] getRow(final int row); @Override void setRow(final int row, final double[] array); @Override double[] getColumn(final int column); @Override void setColumn(final int column, final double[] array); @Override double getEntry(final int row, final int column); @Override void setEntry(final int row, final int column, final double value); @Override void addToEntry(final int row, final int column,
                           final double increment); @Override void multiplyEntry(final int row, final int column,
                              final double factor); @Override BlockRealMatrix transpose(); @Override int getRowDimension(); @Override int getColumnDimension(); @Override double[] operate(final double[] v); @Override double[] preMultiply(final double[] v); @Override double walkInRowOrder(final RealMatrixChangingVisitor visitor); @Override double walkInRowOrder(final RealMatrixPreservingVisitor visitor); @Override double walkInRowOrder(final RealMatrixChangingVisitor visitor,
                                 final int startRow, final int endRow,
                                 final int startColumn, final int endColumn); @Override double walkInRowOrder(final RealMatrixPreservingVisitor visitor,
                                 final int startRow, final int endRow,
                                 final int startColumn, final int endColumn); @Override double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor); @Override double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor); @Override double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor,
                                       final int startRow, final int endRow,
                                       final int startColumn,
                                       final int endColumn); @Override double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor,
                                       final int startRow, final int endRow,
                                       final int startColumn,
                                       final int endColumn); static final int BLOCK_SIZE; }
@Test public void testSetColumnMatrix() { RealMatrix m = new BlockRealMatrix(subTestData); RealMatrix mColumn3 = new BlockRealMatrix(subColumn3); Assert.assertNotSame(mColumn3, m.getColumnMatrix(1)); m.setColumnMatrix(1, mColumn3); Assert.assertEquals(mColumn3, m.getColumnMatrix(1)); try { m.setColumnMatrix(-1, mColumn3); Assert.fail("Expecting OutOfRangeException"); } catch (OutOfRangeException ex) { } try { m.setColumnMatrix(0, m); Assert.fail("Expecting MatrixDimensionMismatchException"); } catch (MatrixDimensionMismatchException ex) { } }