Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/02/14 13:47:19 (10 years ago)
Author:
sbreuer
Message:
  • enhanced usability
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Utils/FindPreprocessingItemsIterator.cs

    r10698 r10705  
    3737    public bool MoveNext() {
    3838      bool result = false;
     39      bool endReached = false;
    3940      if (items != null) {
    4041        do {
     
    4344          } else if (currentCell.Item1 < items.Count - 1) {
    4445            currentCell = new Tuple<int, int>(currentCell.Item1 + 1, 0);
     46          } else {
     47            endReached = true;
    4548          }
    46         } while (!EndReached() && !CurrentCellExists());
    47         result = EndReached();
     49        } while (!endReached && !CurrentCellExists());
     50        result = !endReached;
    4851      }
    4952      return result;
     
    6164    public void Reset() {
    6265      currentCell = new Tuple<int, int>(0, 0);
     66      if (!CurrentCellExists()) {
     67        MoveNext();
     68      }
    6369    }
    6470
     
    7177    }
    7278
    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    //}
    8086  }
    8187}
Note: See TracChangeset for help on using the changeset viewer.