class SubMatrix implements Cloneable {

    public void kronecker(final SubMatrix m, final SubMatrix n) {
        int rm = m.getRowsCount(), cm = m.getColumnsCount();
        int rn = n.getRowsCount(), cn = n.getColumnsCount();
        for (int r = 0, i = 0; r < rm; ++r, i += rn) {
            for (int c = 0, j = 0; c < cm; ++c, j += cn) {
                SubMatrix cur = extract(i, i + rn, j, j + cn);
                double e = m.get(r, c);
                if (e != 0) {
                    cur.setAY(e, n);
                }
            }
        }
    }

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

}