Changeset 6740 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
- Timestamp:
- 09/12/11 13:48:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r6732 r6740 26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.Core; 28 using HeuristicLab.Data; 28 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HeuristicLab.Parameters; 29 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Data;31 using HeuristicLab.Parameters;32 32 33 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 224 224 if (instr.opCode == OpCodes.Variable) { 225 225 var variableTreeNode = instr.dynamicNode as VariableTreeNode; 226 instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);226 instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName); 227 227 code[i] = instr; 228 228 } else if (instr.opCode == OpCodes.LagVariable) { 229 229 var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode; 230 instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);230 instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName); 231 231 code[i] = instr; 232 232 } else if (instr.opCode == OpCodes.VariableCondition) { 233 233 var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode; 234 instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);234 instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName); 235 235 } else if (instr.opCode == OpCodes.Call) { 236 236 necessaryArgStackSize += instr.nArguments + 1; … … 468 468 } 469 469 case OpCodes.Variable: { 470 VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;471 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // load dataset472 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, 0); // sampleOffset473 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // sampleIndex474 il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset475 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, currentInstr.iArg0); // load var476 il.Emit(System.Reflection.Emit.OpCodes.Call, datasetGetValue); // dataset.GetValue477 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight478 il.Emit(System.Reflection.Emit.OpCodes.Mul);470 //VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode; 471 //il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // load dataset 472 //il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, 0); // sampleOffset 473 //il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // sampleIndex 474 //il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset 475 //il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, currentInstr.iArg0); // load var 476 //il.Emit(System.Reflection.Emit.OpCodes.Call, datasetGetValue); // dataset.GetValue 477 //il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight 478 //il.Emit(System.Reflection.Emit.OpCodes.Mul); 479 479 return; 480 480 }
Note: See TracChangeset
for help on using the changeset viewer.