Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/10/11 15:34:19 (13 years ago)
Author:
gkronber
Message:

#1480 added IL emitting tree interpreter for symbolic data analysis and test case. Found and fixed a bug in the existing interpreter for boolean operators OR and AND with NaN arguments. However, this means that the output of previously stored solutions changes. We Probably we should keep the incorrect behavior now and document this accordingly, as changing this would need a version increment of all data analysis plugins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r5987 r6732  
    308308            double result = Evaluate(dataset, ref row, state);
    309309            for (int i = 1; i < currentInstr.nArguments; i++) {
    310               if (result <= 0.0) SkipInstructions(state);
     310              if (result > 0.0) result = Evaluate(dataset, ref row, state);
    311311              else {
    312                 result = Evaluate(dataset, ref row, state);
     312                SkipInstructions(state);
    313313              }
    314314            }
    315             return result <= 0.0 ? -1.0 : 1.0;
     315            return result > 0.0 ? 1.0 : -1.0;
    316316          }
    317317        case OpCodes.OR: {
    318318            double result = Evaluate(dataset, ref row, state);
    319319            for (int i = 1; i < currentInstr.nArguments; i++) {
    320               if (result > 0.0) SkipInstructions(state);
     320              if (result <= 0.0) result = Evaluate(dataset, ref row, state);
    321321              else {
    322                 result = Evaluate(dataset, ref row, state);
     322                SkipInstructions(state);
    323323              }
    324324            }
Note: See TracChangeset for help on using the changeset viewer.