public DelegateDoubleMatrix1D(DoubleMatrix2D newContent, int row) { super(null); if (row < 0 || row >= newContent.rows()) throw new IllegalArgumentException(); setUp(newContent.columns()); this.row=row; this.content = newContent; } /**
/** Constructs and returns a new <i>slice view</i> representing the 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. To obtain a slice view on subranges, construct a sub-ranging view (<tt>viewPart(...)</tt>), then apply this method to the sub-range view. <p> <b>Example:</b> <table border="0"> <tr nowrap> <td valign="top">2 x 3 matrix: <br> 1, 2, 3<br> 4, 5, 6 </td> <td>viewRow(0) ==></td> <td valign="top">Matrix1D of size 3:<br> 1, 2, 3</td> </tr> </table> @param row the row to fix. @return a new slice view. @throws IndexOutOfBoundsException if <tt>row < 0 || row >= rows()</tt>. @see #viewColumn(int) */ public DoubleMatrix1D viewRow(int row) { checkRow(row); return new DelegateDoubleMatrix1D(this,row); } /**
/** Constructs and returns a new <i>slice view</i> representing the 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. To obtain a slice view on subranges, construct a sub-ranging view (<tt>viewPart(...)</tt>), then apply this method to the sub-range view. <p> <b>Example:</b> <table border="0"> <tr nowrap> <td valign="top">2 x 3 matrix: <br> 1, 2, 3<br> 4, 5, 6 </td> <td>viewRow(0) ==></td> <td valign="top">Matrix1D of size 3:<br> 1, 2, 3</td> </tr> </table> @param row the row to fix. @return a new slice view. @throws IndexOutOfBoundsException if <tt>row < 0 || row >= rows()</tt>. @see #viewColumn(int) */ public DoubleMatrix1D viewRow(int row) { checkRow(row); return new DelegateDoubleMatrix1D(this,row); } /**
public DelegateDoubleMatrix1D(DoubleMatrix2D newContent, int row) { super(null); if (row < 0 || row >= newContent.rows()) throw new IllegalArgumentException(); setUp(newContent.columns()); this.row=row; this.content = newContent; } /**