class SubMatrix implements Cloneable {

    @Override
    public String toString() {
        if (isEmpty()) {
            return "";
        }
        StringBuilder builder = new StringBuilder();
        DataBlockIterator rows = this.rows();
        do {
            builder.append(rows.getData()).append(System.lineSeparator());
        } while (rows.next());
        return builder.toString();
    }

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

}