- Timestamp:
- 03/30/09 12:51:34 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/Default/Decomposers/ArrayDecomposer.cs
r1454 r1463 43 43 e.MoveNext(); 44 44 lowerBounds[i] = (int)e.Current.Value; 45 } 46 Array a = Array.CreateInstance(t.GetElementType(), lengths, lowerBounds); 47 int[] positions = new int[rank];45 } 46 Array a = Array.CreateInstance(t.GetElementType(), lengths, lowerBounds); 47 int[] positions = (int[])lowerBounds.Clone(); 48 48 while (e.MoveNext()) { 49 49 int[] currentPositions = positions; … … 51 51 positions[0] += 1; 52 52 for (int i = 0; i < rank-1; i++) { 53 if (positions[i] >= lengths[i] ) {54 positions[i] = 0;53 if (positions[i] >= lengths[i]+lowerBounds[i]) { 54 positions[i] = lowerBounds[i]; 55 55 positions[i + 1] += 1; 56 56 } else {
Note: See TracChangeset
for help on using the changeset viewer.