class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializable {

    @Override
    public double[] operate(final double[] v)
        throws DimensionMismatchException {
        final int nRows = this.getRowDimension();
        final int nCols = this.getColumnDimension();
        if (v.length != nCols) {
            throw new DimensionMismatchException(v.length, nCols);
        }
        final double[] out = new double[nRows];
        for (int row = 0; row < nRows; row++) {
            final double[] dataRow = data[row];
            double sum = 0;
            for (int i = 0; i < nCols; i++) {
                sum += dataRow[i] * v[i];
            }
            out[row] = sum;
        }
        return out;
    }

    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);

}