class SubMatrix implements Cloneable {

    public void shift(final int n) {
        if (n < 0) {
            int del = (m_row_inc + m_col_inc) * n;

            for (int c = 0, i = m_start; c < m_ncols + n; ++c, i += m_col_inc) {
                for (int r = 0, j = i; r < m_nrows + n; ++r, j += m_row_inc) {
                    m_data[j] = m_data[j - del];
                }
            }
        } else if (n > 0) {
            /*
             * SubMatrix t = Extract(n, m_nrows, n, m_ncols); SubMatrix s =
             * Extract(0, m_nrows - n, 0, m_ncols - n); RCIterator tc =
             * t.Columns(), sc = s.Columns(); tc.End(); sc.End(); do
             * tc.Current.Copy(sc.Current); while (tc.Previous() &&
             * sc.Previous()); if (bzero) { for (int c = 0; c < n; ++c)
             * Column(c).Set(0); for (int r = 0; r < n; ++r) Row(r).Set(0); }
             */

            int del = (m_row_inc + m_col_inc) * n;

            for (int c = n, i = m_start + (m_nrows - 1) * m_row_inc
                    + (m_ncols - 1) * m_col_inc; c < m_ncols; ++c, i -= m_col_inc) {
                for (int r = n, j = i; r < m_nrows; ++r, j -= m_row_inc) {
                    m_data[j] = m_data[j - del];
                }
            }
        }
    }

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

}