Changeset 18180 for branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
- Timestamp:
- 01/10/22 10:15:25 (2 years ago)
- Location:
- branches/3138_Shape_Constraints_Transformations
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3138_Shape_Constraints_Transformations
- Property svn:mergeinfo changed
-
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
r17993 r18180 186 186 break; 187 187 } 188 case OpCodes.Number: // fall through 188 189 case OpCodes.Constant: { 189 var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;190 result = new Interval(constTreeNode.Value, constTreeNode.Value);191 190 var numericTreeNode = (INumericTreeNode)currentInstr.dynamicNode; 191 result = new Interval(numericTreeNode.Value, numericTreeNode.Value); 192 break; 192 193 } 193 194 case OpCodes.Add: { … … 324 325 if ( 325 326 !(n.Symbol is Variable) && 327 !(n.Symbol is Number) && 326 328 !(n.Symbol is Constant) && 327 329 !(n.Symbol is StartSymbol) && … … 346 348 else if (n.Symbol is Power) { 347 349 // only integer exponents are supported 348 var exp = n.GetSubtree(1) as ConstantTreeNode;349 if (exp == null || exp.Value != Math.Truncate(exp.Value)) return false;350 var exponent = n.GetSubtree(1) as INumericTreeNode; 351 if (exponent == null || exponent.Value != Math.Truncate(exponent.Value)) return false; 350 352 } 351 353 }
Note: See TracChangeset
for help on using the changeset viewer.