Changeset 5288 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
- Timestamp:
- 01/12/11 13:19:53 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
r5223 r5288 65 65 public const byte Constant = 20; 66 66 public const byte Arg = 21; 67 68 public const byte Power = 22; 67 69 } 68 70 … … 89 91 { typeof(Constant), OpCodes.Constant }, 90 92 { typeof(Argument), OpCodes.Arg }, 93 { typeof(Power),OpCodes.Power}, 91 94 }; 92 95 private const int ARGUMENT_STACK_SIZE = 1024; … … 185 188 return Math.Tan(Evaluate(dataset, ref row, code, ref pc, argumentStack, ref argStackPointer)); 186 189 } 190 case OpCodes.Power: { 191 double x = Evaluate(dataset, ref row, code, ref pc, argumentStack, ref argStackPointer); 192 double y = Evaluate(dataset, ref row, code, ref pc, argumentStack, ref argStackPointer); 193 return Math.Pow(x, y); 194 } 187 195 case OpCodes.Exp: { 188 196 return Math.Exp(Evaluate(dataset, ref row, code, ref pc, argumentStack, ref argStackPointer));
Note: See TracChangeset
for help on using the changeset viewer.