/** Constructs and returns a new 2-dimensional <i>slice view</i> representing the slices and rows of the given column. 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 column the index of the column to fix. @return a new 2-dimensional slice view. @throws IndexOutOfBoundsException if <tt>column < 0 || column >= columns()</tt>. @see #viewSlice(int) @see #viewRow(int) */ public DoubleMatrix2D viewColumn(int column) { checkColumn(column); int sliceRows = this.slices; int sliceColumns = this.rows; //int sliceOffset = index(0,0,column); int sliceRowZero = sliceZero; int sliceColumnZero = rowZero + _columnOffset(_columnRank(column)); int sliceRowStride = this.sliceStride; int sliceColumnStride = this.rowStride; return like2D(sliceRows,sliceColumns,sliceRowZero,sliceColumnZero,sliceRowStride,sliceColumnStride); } /**
/** Constructs and returns a new 2-dimensional <i>slice view</i> representing the slices and rows of the given column. 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 column the index of the column to fix. @return a new 2-dimensional slice view. @throws IndexOutOfBoundsException if <tt>column < 0 || column >= columns()</tt>. @see #viewSlice(int) @see #viewRow(int) */ public DoubleMatrix2D viewColumn(int column) { checkColumn(column); int sliceRows = this.slices; int sliceColumns = this.rows; //int sliceOffset = index(0,0,column); int sliceRowZero = sliceZero; int sliceColumnZero = rowZero + _columnOffset(_columnRank(column)); int sliceRowStride = this.sliceStride; int sliceColumnStride = this.rowStride; return like2D(sliceRows,sliceColumns,sliceRowZero,sliceColumnZero,sliceRowStride,sliceColumnStride); } /**
columnOffsets[i] = _columnOffset(_columnRank(columnIndexes[i]));
columnOffsets[i] = _columnOffset(_columnRank(columnIndexes[i]));