Changeset 9004 for trunk/sources
- Timestamp:
- 12/05/12 19:00:39 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisExpressionTreeInterpreter.cs
r8798 r9004 82 82 83 83 string targetVariable = TargetVariable; 84 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 85 var state = PrepareInterpreterState(tree, dataset, targetVariableCache); 84 lock (EvaluatedSolutions) { 85 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 86 } 87 var state = PrepareInterpreterState(tree, dataset, targetVariableCache, TargetVariable); 86 88 var rowsEnumerator = rows.GetEnumerator(); 87 89 var horizonsEnumerator = horizons.GetEnumerator(); … … 114 116 } 115 117 116 private InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset, double[] targetVariableCache) {118 private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset, double[] targetVariableCache, string targetVariable) { 117 119 Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode); 118 120 int necessaryArgStackSize = 0; … … 120 122 if (instr.opCode == OpCodes.Variable) { 121 123 var variableTreeNode = (VariableTreeNode)instr.dynamicNode; 122 if (variableTreeNode.VariableName == TargetVariable)124 if (variableTreeNode.VariableName == targetVariable) 123 125 instr.iArg0 = targetVariableCache; 124 126 else … … 126 128 } else if (instr.opCode == OpCodes.LagVariable) { 127 129 var variableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode; 128 if (variableTreeNode.VariableName == TargetVariable)130 if (variableTreeNode.VariableName == targetVariable) 129 131 instr.iArg0 = targetVariableCache; 130 132 else … … 132 134 } else if (instr.opCode == OpCodes.VariableCondition) { 133 135 var variableTreeNode = (VariableConditionTreeNode)instr.dynamicNode; 134 if (variableTreeNode.VariableName == TargetVariable)136 if (variableTreeNode.VariableName == targetVariable) 135 137 instr.iArg0 = targetVariableCache; 136 138 else -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r8486 r9004 99 99 throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter."); 100 100 101 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 101 lock (EvaluatedSolutions) { 102 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 103 } 102 104 var state = PrepareInterpreterState(tree, dataset); 103 105 … … 109 111 } 110 112 111 private InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) {113 private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) { 112 114 Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode); 113 115 int necessaryArgStackSize = 0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs
r8764 r9004 331 331 [StorableConstructor] 332 332 public TimeSeriesPrognosisResults(bool deserializing) : base(deserializing) { } 333 protected TimeSeriesPrognosisResults(TimeSeriesPrognosisResults original, Cloner cloner) : base(original, cloner) { } 333 protected TimeSeriesPrognosisResults(TimeSeriesPrognosisResults original, Cloner cloner) 334 : base(original, cloner) { 335 this.trainingHorizon = original.trainingHorizon; 336 this.testHorizon = original.testHorizon; 337 this.solution = cloner.Clone(original.solution); 338 } 334 339 public override IDeepCloneable Clone(Cloner cloner) { 335 340 return new TimeSeriesPrognosisResults(this, cloner);
Note: See TracChangeset
for help on using the changeset viewer.