Changeset 15281 for branches/Async/HeuristicLab.Data/3.3/ValueTypeMatrix.cs
- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Data/3.3
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Data/3.3/ValueTypeMatrix.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 195 195 } 196 196 197 198 public T[,] CloneAsMatrix() { 199 //mkommend: this works because T must be a value type (struct constraint); 200 return (T[,])matrix.Clone(); 201 } 202 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 197 215 public override string ToString() { 198 216 if (matrix.Length == 0) return "[]";
Note: See TracChangeset
for help on using the changeset viewer.