class SubMatrix implements Cloneable {

    public void addAY(final double a, final SubMatrix Y) {
        if (a == 0) {
            return;
        }
        // if (m_nrows != Y.m_nrows || m_ncols != Y.m_ncols)
        // throw new MatrixException(MatrixException.IncompatibleDimensions);
        DataBlockIterator iter, siter;
        if (m_row_inc == 1) {
            iter = columns();
            siter = Y.columns();
        } else {
            iter = rows();
            siter = Y.rows();
        }

        DataBlock icur = iter.getData(), sicur = siter.getData();
        do {
            icur.addAY(a, sicur);
        } while (iter.next() && siter.next());
    }

    public  SubMatrix(final double[] data, final int nrows, final int ncols);
    public  SubMatrix(final double[] data, final int start, final int nrows,
            final int ncols, final int rowinc, final int colinc);
    public  SubMatrix(final SubMatrix m);

}