Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/15/20 11:05:59 (5 years ago)
Author:
chaider
Message:

#2971 Check if the derived tree contains not allowed symbols

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs

    r17510 r17512  
    114114        var tree = solution;
    115115        for (var i = 0; i < constraint.NumberOfDerivations; ++i) {
    116             tree = DerivativeCalculator.Derive(tree, constraint.Variable);
     116          if (!IntervalInterpreter.IsCompatible(tree) || !DerivativeCalculator.IsCompatible(tree))
     117            throw new ArgumentException("Cube, Root, Power Symbols are not supported.");
     118          tree = DerivativeCalculator.Derive(tree, constraint.Variable);
    117119        }
    118120        resultInterval = intervalInterpreter.GetSymbolicExpressionTreeInterval(tree, variableRanges);
Note: See TracChangeset for help on using the changeset viewer.