Note that the view is really just a range restriction: The returned matrix is backed by this matrix, so changes in the returned matrix are reflected in this matrix, and vice-versa.
The view contains the cells from index..index+width-1. and has view.size() == width. A view's legal coordinates are again zero based, as usual. In other words, legal coordinates of the view are 0 .. view.size()-1==width-1. As usual, any attempt to access a cell at other coordinates will throw an IndexOutOfBoundsException. @param index The index of the first cell. @param width The width of the range. @throws IndexOutOfBoundsException if index<0 || width<0 || index+width>size(). @return the new view.
Note that the view is really just a range restriction: The returned matrix is backed by this matrix, so changes in the returned matrix are reflected in this matrix, and vice-versa.
The view contains the cells from [row,column] to [row+height-1,column+width-1], all inclusive. and has view.rows() == height; view.columns() == width;. A view's legal coordinates are again zero based, as usual. In other words, legal coordinates of the view range from [0,0] to [view.rows()-1==height-1,view.columns()-1==width-1]. As usual, any attempt to access a cell at a coordinate column<0 || column>=view.columns() || row<0 || row>=view.rows() will throw an IndexOutOfBoundsException. @param row The index of the row-coordinate. @param column The index of the column-coordinate. @param height The height of the box. @param width The width of the box. @throws IndexOutOfBoundsException if column<0 || width<0 || column+width>columns() || row<0 || height<0 || row+height>rows() @return the new view.
Note that the view is really just a range restriction: The returned matrix is backed by this matrix, so changes in the returned matrix are reflected in this matrix, and vice-versa.
The view contains the cells from [row,column] to [row+height-1,column+width-1], all inclusive. and has view.rows() == height; view.columns() == width;. A view's legal coordinates are again zero based, as usual. In other words, legal coordinates of the view range from [0,0] to [view.rows()-1==height-1,view.columns()-1==width-1]. As usual, any attempt to access a cell at a coordinate column<0 || column>=view.columns() || row<0 || row>=view.rows() will throw an IndexOutOfBoundsException. @param row The index of the row-coordinate. @param column The index of the column-coordinate. @param height The height of the box. @param width The width of the box. @return the new view. @throws IndexOutOfBoundsException if column<0 || width<0 || column+width>columns() || row<0 || height<0 ||row+height>rows()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|