Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 10:43:58 (13 years ago)
Author:
gkronber
Message:

#1453: improved performance of online evaluators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineCovarianceEvaluator.cs

    r5894 r5904  
    5555
    5656    public void Add(double original, double estimated) {
    57       if (double.IsNaN(estimated) || double.IsInfinity(estimated) || double.IsNaN(original) || double.IsInfinity(original)) {
     57      if (double.IsNaN(estimated) || double.IsInfinity(estimated) || double.IsNaN(original) || double.IsInfinity(original) || (errorState & OnlineEvaluatorError.InvalidValueAdded) > 0) {
    5858        errorState = errorState | OnlineEvaluatorError.InvalidValueAdded;
    59       } else if (!errorState.HasFlag(OnlineEvaluatorError.InvalidValueAdded)) {
     59      } else {
    6060        n++;
    61         errorState = OnlineEvaluatorError.None;        // n >= 1
     61        errorState = errorState & (~OnlineEvaluatorError.InsufficientElementsAdded);        // n >= 1
    6262
    6363        // online calculation of tMean
Note: See TracChangeset for help on using the changeset viewer.