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/OnlineNormalizedMeanSquaredErrorEvaluator.cs

    r5559 r5564  
    6767      OnlineNormalizedMeanSquaredErrorEvaluator normalizedMSEEvaluator = new OnlineNormalizedMeanSquaredErrorEvaluator();
    6868
    69       while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) {
     69      // always move forward both enumerators (do not use short-circuit evaluation!)
     70      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
    7071        double estimated = secondEnumerator.Current;
    7172        double original = firstEnumerator.Current;
     
    7374      }
    7475
     76      // check if both enumerators are at the end to make sure both enumerations have the same length
    7577      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
    7678        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
Note: See TracChangeset for help on using the changeset viewer.