Changeset 17914 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators
- Timestamp:
- 03/24/21 10:13:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSEConstraintsEvaluator.cs
r17906 r17914 132 132 } else { 133 133 if (applyLinearScaling) { 134 //Check for interval arithmetic grammar135 if (!(tree.Root.Grammar is IntervalArithmeticGrammar))136 throw new ArgumentException($"{ItemName} can only be used with IntervalArithmeticGrammar.");137 138 134 var rootNode = new ProgramRootSymbol().CreateTreeNode(); 139 135 var startNode = new StartSymbol().CreateTreeNode(); … … 141 137 .GetSubtree(0); //Offset 142 138 var scaling = offset.GetSubtree(0); 139 140 //Check if tree contains offset and scaling nodes 141 if (!(offset.Symbol is Addition) || !(scaling.Symbol is Multiplication)) 142 throw new ArgumentException($"{ItemName} can only be used with IntervalArithmeticGrammar."); 143 143 144 var t = (ISymbolicExpressionTreeNode)scaling.GetSubtree(0).Clone(); 144 145 rootNode.AddSubtree(startNode);
Note: See TracChangeset
for help on using the changeset viewer.