- Timestamp:
- 04/23/21 18:26:45 (4 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
r17911 r17963 283 283 break; 284 284 } 285 case OpCodes.Power: { 286 var a = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); 287 var b = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); 288 // support only integer powers 289 if(b.LowerBound == b.UpperBound && Math.Truncate(b.LowerBound) == b.LowerBound) { 290 result = Interval.Power(a, (int)b.LowerBound); 291 } else { 292 throw new NotSupportedException("Interval is only supported for integer powers"); 293 } 294 break; 295 } 296 285 297 case OpCodes.Absolute: { 286 298 var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); … … 329 341 !(n.Symbol is Cube) && 330 342 !(n.Symbol is CubeRoot) && 343 !(n.Symbol is Power) && 331 344 !(n.Symbol is Absolute) && 332 345 !(n.Symbol is AnalyticQuotient) -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
r17180 r17963 144 144 { typeof(Cosine), OpCodes.Cos }, 145 145 { typeof(Tangent), OpCodes.Tan }, 146 { typeof 146 { typeof(HyperbolicTangent), OpCodes.Tanh}, 147 147 { typeof(Logarithm), OpCodes.Log }, 148 148 { typeof(Exponential), OpCodes.Exp },
Note: See TracChangeset
for help on using the changeset viewer.