Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/14/20 12:00:47 (5 years ago)
Author:
chaider
Message:

#2971:

  • Added cube, cuberoot, absolute and analytical quotient to IntervalInterpreter
  • Extended the IsCompatible method in IntervalInterpreter (removed power, root because not implemented in DerivativeCalculator
  • Added checks for known symbols at InteractiveSymbolicDataAnalysisSolutionSimplifierView and SymbolicRegressionSolution
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs

    r17180 r17509  
    260260            break;
    261261          }
     262        case OpCodes.Cube: {
     263            var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals);
     264            result = Interval.Cube(argumentInterval);
     265            break;
     266          }
     267        case OpCodes.CubeRoot: {
     268            var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals);
     269            result = Interval.CubicRoot(argumentInterval);
     270            break;
     271          }
     272        case OpCodes.Absolute: {
     273            var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals);
     274            result = Interval.Absolute(argumentInterval);
     275            break;
     276          }
     277        case OpCodes.AnalyticQuotient: {
     278            result = Evaluate(instructions, ref instructionCounter, nodeIntervals);
     279            for (var i = 1; i < currentInstr.nArguments; i++) {
     280              var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals);
     281              result = Interval.AnalyticalQuotient(result, argumentInterval);
     282            }
     283
     284            break;
     285          }
    262286        default:
    263287          throw new NotSupportedException($"The tree contains the unknown symbol {currentInstr.dynamicNode.Symbol}");
     
    284308          !(n.Symbol is Logarithm) &&
    285309          !(n.Symbol is Exponential) &&
    286           !(n.Symbol is Power) &&
     310          //!(n.Symbol is Power) && //Interval Contains the symbol power, but the DerivativeCalculator does not!
    287311          !(n.Symbol is Square) &&
    288           !(n.Symbol is Root) &&
     312          //!(n.Symbol is Root) && //Interval Contains the symbol root, but the DerivativeCalculator does not!
    289313          !(n.Symbol is SquareRoot) &&
    290314          !(n.Symbol is Problems.DataAnalysis.Symbolic.Variable) &&
    291           !(n.Symbol is Constant)
     315          !(n.Symbol is Constant) &&
     316          !(n.Symbol is Cube) &&
     317          !(n.Symbol is CubeRoot) &&
     318          !(n.Symbol is Absolute) &&
     319          !(n.Symbol is AnalyticQuotient)
    292320        select n).Any();
    293321      return !containsUnknownSyumbol;
Note: See TracChangeset for help on using the changeset viewer.