Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14672


Ignore:
Timestamp:
02/13/17 22:49:15 (7 years ago)
Author:
abeham
Message:

#2732: Added methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs

    r14185 r14672  
    201201    }
    202202
     203    public virtual IEnumerable<T> GetRow(int row) {
     204      for (var col = 0; col < Columns; col++) {
     205        yield return matrix[row, col];
     206      }
     207    }
     208
     209    public virtual IEnumerable<T> GetColumn(int col) {
     210      for (var row = 0; row < Rows; row++) {
     211        yield return matrix[row, col];
     212      }
     213    }
     214
    203215    public override string ToString() {
    204216      if (matrix.Length == 0) return "[]";
Note: See TracChangeset for help on using the changeset viewer.