Changeset 1926
- Timestamp:
- 05/28/09 15:26:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.ConditionalEvaluation/3.3/ConditionalEvaluatorBase.cs
r1916 r1926 51 51 // check if condition variable is true between sample - minTimeOffset and sample - maxTimeOffset 52 52 bool skip = false; 53 for (int checkIndex = sample + minTimeOffset; checkIndex <= sample + maxTimeOffset && !skip 53 for (int checkIndex = sample + minTimeOffset; checkIndex <= sample + maxTimeOffset && !skip; checkIndex++) { 54 54 if (dataset.GetValue(checkIndex, conditionVariable) == 0) { 55 55 skip = true; … … 63 63 dataset.SetValue(sample, targetVariable, estimated); 64 64 } 65 values[sample - start , 0] = estimated;66 values[sample - start , 1] = original;65 values[sample - start - skippedSampels, 0] = estimated; 66 values[sample - start - skippedSampels, 1] = original; 67 67 } 68 68 } 69 //needed because otherwise the array is too larged dimension and therefore the sample count is false during calculation 70 ResizeArray(ref values, 2, end - start - skippedSampels); 69 71 70 72 … … 78 80 } 79 81 qualityData.Data = quality; 80 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data -= skippedSampels; 82 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data -= skippedSampels; 83 } 84 85 86 private void ResizeArray(ref double[,] original, int cols, int rows) { 87 double[,] newArray = new double[rows, cols]; 88 Array.Copy(original, newArray, cols * rows); 89 original = newArray; 81 90 } 82 91
Note: See TracChangeset
for help on using the changeset viewer.