Changeset 6755 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
- Timestamp:
- 09/13/11 17:38:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r6741 r6755 44 44 private static MethodInfo log = typeof(Math).GetMethod("Log", new Type[] { typeof(double) }); 45 45 private static MethodInfo power = typeof(Math).GetMethod("Pow", new Type[] { typeof(double), typeof(double) }); 46 private static MethodInfo round = typeof(Math).GetMethod("Round", new Type[] { typeof(double) }); 46 47 47 48 internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns); … … 340 341 CompileInstructions(il, state); 341 342 CompileInstructions(il, state); 343 il.Emit(System.Reflection.Emit.OpCodes.Call, round); 342 344 il.Emit(System.Reflection.Emit.OpCodes.Call, power); 343 345 return; 344 346 } 345 347 case OpCodes.Root: { 346 throw new NotImplementedException(); 348 CompileInstructions(il, state); 349 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1 / round(...) 350 CompileInstructions(il, state); 351 il.Emit(System.Reflection.Emit.OpCodes.Call, round); 352 il.Emit(System.Reflection.Emit.OpCodes.Div); 353 il.Emit(System.Reflection.Emit.OpCodes.Call, power); 354 return; 347 355 } 348 356 case OpCodes.Exp: {
Note: See TracChangeset
for help on using the changeset viewer.