Ignore:
Timestamp:
04/04/11 18:09:49 (11 years ago)
Author:
mkommend
Message:

#1453: Stopped iterating over the enumerables in the static calculate method in OnlineCalculators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineLinearScalingParameterCalculator.cs

    r5943 r5945  
    107107        double targetElement = targetEnumerator.Current;
    108108        calculator.Add(originalElement, targetElement);
     109        if (calculator.ErrorState != OnlineCalculatorError.None) break;
    109110      }
    110111
    111112      // check if both enumerators are at the end to make sure both enumerations have the same length
    112       if (originalEnumerator.MoveNext() || targetEnumerator.MoveNext()) {
     113      if (calculator.ErrorState == OnlineCalculatorError.None &&
     114            (originalEnumerator.MoveNext() || targetEnumerator.MoveNext())) {
    113115        throw new ArgumentException("Number of elements in original and target enumeration do not match.");
    114116      } else {
Note: See TracChangeset for help on using the changeset viewer.