/******************/ /* PUBLIC METHODS */ /******************/ /// <summary>AsEnumerable</summary> /// <returns></returns> public IEnumerable <MatrixBase <T> > AsEnumerable() { int j = 0; while (j < _dataView.RowCount) { yield return(_dataView.SubMatrix(new Int32Range(0, _dataView.ColumnCount), new Int32Range(j, ++j))); } }
/// <summary>Creates a new matrix pointing at the same underlying data /// set, windowed to the specified column and row ranges</summary> /// <param name="columnRange">Sub-matrix column range</param> /// <param name="rowRange">Sub-matrix row range</param> /// <returns></returns> public virtual MatrixBase <T> SubMatrix( Int32Range columnRange, Int32Range rowRange) { return(MatrixBase <T> .SubMatrix(this, columnRange, rowRange)); }
/// <summary> /// /// </summary> /// <param name="columnRange"></param> /// <param name="rowRange"></param> /// <returns></returns> public DoubleMatrix SubMatrix( Int32Range columnRange, Int32Range rowRange) { return(new DoubleMatrix(MatrixBase <Double> .SubMatrix(this.InnerMatrix, columnRange, rowRange))); }