class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializable {

    public Array2DRowRealMatrix add(final Array2DRowRealMatrix m)
        throws MatrixDimensionMismatchException {
        // Safety check.
        MatrixUtils.checkAdditionCompatible(this, m);

        final int rowCount    = getRowDimension();
        final int columnCount = getColumnDimension();
        final double[][] outData = new double[rowCount][columnCount];
        for (int row = 0; row < rowCount; row++) {
            final double[] dataRow    = data[row];
            final double[] mRow       = m.data[row];
            final double[] outDataRow = outData[row];
            for (int col = 0; col < columnCount; col++) {
                outDataRow[col] = dataRow[col] + mRow[col];
            }
        }

        return new Array2DRowRealMatrix(outData, false);
    }

    public  Array2DRowRealMatrix();
    public  Array2DRowRealMatrix(final int rowDimension,
                                final int columnDimension);
    public  Array2DRowRealMatrix(final double[][] d);
    public  Array2DRowRealMatrix(final double[][] d, final boolean copyArray);
    public  Array2DRowRealMatrix(final double[] v);

}