Changeset 15932
- Timestamp:
- 05/09/18 12:18:22 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Data/3.3/TriangularMatrix.cs
r15931 r15932 75 75 public override T this[int rowIndex, int columnIndex] { 76 76 get { 77 if (columnIndex > rowIndex) return default(T); // upper triangular half is zero (default value of T) 77 // provide symmetry of returned values 78 if (columnIndex > rowIndex) return this[columnIndex, rowIndex]; 78 79 return storage[rowIndex * (rowIndex + 1) / 2 + columnIndex]; 79 80 } 80 81 set { 81 if (columnIndex > rowIndex) th row new NotSupportedException();82 storage[rowIndex * (rowIndex + 1) / 2 + columnIndex] = value;82 if (columnIndex > rowIndex) this[columnIndex, rowIndex] = value; 83 else storage[rowIndex * (rowIndex + 1) / 2 + columnIndex] = value; 83 84 } 84 85 }
Note: See TracChangeset
for help on using the changeset viewer.