Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/11 09:40:16 (14 years ago)
Author:
gkronber
Message:

#1418 fixed bugs in online evaluators introduced with r5559

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlinePearsonsRSquaredEvaluator.cs

    r5559 r5564  
    7575      OnlinePearsonsRSquaredEvaluator rSquaredEvaluator = new OnlinePearsonsRSquaredEvaluator();
    7676
    77       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     77      // always move forward both enumerators (do not use short-circuit evaluation!)
     78      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7879        double estimated = secondEnumerator.Current;
    7980        double original = firstEnumerator.Current;
     
    8182      }
    8283
     84      // check if both enumerators are at the end to make sure both enumerations have the same length
    8385      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    8486        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
Note: See TracChangeset for help on using the changeset viewer.