- Timestamp:
- 04/02/14 13:47:19 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Utils/FindPreprocessingItemsIterator.cs
r10698 r10705 37 37 public bool MoveNext() { 38 38 bool result = false; 39 bool endReached = false; 39 40 if (items != null) { 40 41 do { … … 43 44 } else if (currentCell.Item1 < items.Count - 1) { 44 45 currentCell = new Tuple<int, int>(currentCell.Item1 + 1, 0); 46 } else { 47 endReached = true; 45 48 } 46 } while (! EndReached()&& !CurrentCellExists());47 result = EndReached();49 } while (!endReached && !CurrentCellExists()); 50 result = !endReached; 48 51 } 49 52 return result; … … 61 64 public void Reset() { 62 65 currentCell = new Tuple<int, int>(0, 0); 66 if (!CurrentCellExists()) { 67 MoveNext(); 68 } 63 69 } 64 70 … … 71 77 } 72 78 73 private bool EndReached() {74 bool result = true;75 if (items != null && CurrentCellExists()) {76 result = currentCell.Item1 >= items.Count - 1 && currentCell.Item2 >= items[currentCell.Item1].Count - 1;77 }78 return result;79 }79 //private bool EndReached() { 80 // bool result = true; 81 // if (items != null && CurrentCellExists()) { 82 // result = currentCell.Item1 >= items.Count - 1 && currentCell.Item2 >= items[currentCell.Item1].Count - 1; 83 // } 84 // return result; 85 //} 80 86 } 81 87 }
Note: See TracChangeset
for help on using the changeset viewer.