/// <summary> /// Constructs and returns a new <i>stride view</i> which is a sub matrix consisting of every i-th cell. /// More specifically, the view has Size <i>this.Count/stride</i> holding cells <i>this.Get(i*stride)</i> for all <i>i = 0..Count/stride - 1</i>. /// </summary> /// <param name="_stride">the step factor.</param> /// <returns>the new view.</returns> /// <exception cref="IndexOutOfRangeException">if <i>stride <= 0</i>.</exception> public override DoubleMatrix2D ViewStrides(int _rowStride, int _columnStride) { if (_rowStride <= 0 || _columnStride <= 0) { throw new IndexOutOfRangeException("illegal stride"); } DoubleMatrix2D view = new WrapperDoubleMatrix2DStrides(this, _rowStride, _columnStride); return(view); }
/// <summary> /// Constructs and returns a new <i>stride view</i> which is a sub matrix consisting of every i-th cell. /// More specifically, the view has Size <i>this.Count/stride</i> holding cells <i>this.Get(i*stride)</i> for all <i>i = 0..Count/stride - 1</i>. /// </summary> /// <param name="_stride">the step factor.</param> /// <returns>the new view.</returns> /// <exception cref="IndexOutOfRangeException">if <i>stride <= 0</i>.</exception> public override DoubleMatrix2D ViewStrides(int _rowStride, int _columnStride) { if (_rowStride <= 0 || _columnStride <= 0) { throw new IndexOutOfRangeException(Cern.LocalizedResources.Instance().Exception_IllegalStride); } DoubleMatrix2D view = new WrapperDoubleMatrix2DStrides(this, _rowStride, _columnStride); return(view); }