/** Constructs and returns a new 2-dimensional <i>slice view</i> representing the slices and columns of the given row. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa. <p> To obtain a slice view on subranges, construct a sub-ranging view (<tt>view().part(...)</tt>), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods <tt>viewColumn</tt>, <tt>viewRow</tt>) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps. @param row the index of the row to fix. @return a new 2-dimensional slice view. @throws IndexOutOfBoundsException if <tt>row < 0 || row >= row()</tt>. @see #viewSlice(int) @see #viewColumn(int) */ public DoubleMatrix2D viewRow(int row) { checkRow(row); int sliceRows = this.slices; int sliceColumns = this.columns; //int sliceOffset = index(0,row,0); int sliceRowZero = sliceZero ; int sliceColumnZero = columnZero + _rowOffset(_rowRank(row)); int sliceRowStride = this.sliceStride; int sliceColumnStride = this.columnStride; return like2D(sliceRows,sliceColumns,sliceRowZero,sliceColumnZero,sliceRowStride,sliceColumnStride); } /**
/** Constructs and returns a new 2-dimensional <i>slice view</i> representing the slices and columns of the given row. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa. <p> To obtain a slice view on subranges, construct a sub-ranging view (<tt>view().part(...)</tt>), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods <tt>viewColumn</tt>, <tt>viewRow</tt>) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps. @param row the index of the row to fix. @return a new 2-dimensional slice view. @throws IndexOutOfBoundsException if <tt>row < 0 || row >= row()</tt>. @see #viewSlice(int) @see #viewColumn(int) */ public DoubleMatrix2D viewRow(int row) { checkRow(row); int sliceRows = this.slices; int sliceColumns = this.columns; //int sliceOffset = index(0,row,0); int sliceRowZero = sliceZero ; int sliceColumnZero = columnZero + _rowOffset(_rowRank(row)); int sliceRowStride = this.sliceStride; int sliceColumnStride = this.columnStride; return like2D(sliceRows,sliceColumns,sliceRowZero,sliceColumnZero,sliceRowStride,sliceColumnStride); } /**
rowOffsets[i] = _rowOffset(_rowRank(rowIndexes[i]));
rowOffsets[i] = _rowOffset(_rowRank(rowIndexes[i]));