Changeset 18093 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
- Timestamp:
- 11/24/21 13:40:39 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
r17993 r18093 186 186 break; 187 187 } 188 case OpCodes.Number: { 189 var constTreeNode = (NumTreeNode)currentInstr.dynamicNode; 190 result = new Interval(constTreeNode.Value, constTreeNode.Value); 191 break; 192 } 188 193 case OpCodes.Constant: { 189 var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;190 191 194 var constTreeNode = (RealConstantTreeNode)currentInstr.dynamicNode; 195 result = new Interval(constTreeNode.Value, constTreeNode.Value); 196 break; 192 197 } 193 198 case OpCodes.Add: { … … 324 329 if ( 325 330 !(n.Symbol is Variable) && 326 !(n.Symbol is Constant) &&331 !(n.Symbol is Num) && 327 332 !(n.Symbol is StartSymbol) && 328 333 !(n.Symbol is Addition) && … … 346 351 else if (n.Symbol is Power) { 347 352 // only integer exponents are supported 348 var exp = n.GetSubtree(1) as ConstantTreeNode;353 var exp = n.GetSubtree(1) as NumTreeNode; 349 354 if (exp == null || exp.Value != Math.Truncate(exp.Value)) return false; 350 355 }
Note: See TracChangeset
for help on using the changeset viewer.