Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/05/08 21:34:12 (15 years ago)
Author:
gkronber
Message:

fixed a stupid mistake introduced with r702 #328 (GP evaluation doesn't work in a thread parallel engine).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/GPEvaluatorBase.cs

    r702 r712  
    5757      double[] backupValues = null;
    5858      // prepare for autoregressive modelling by saving the original values of the target-variable to a backup array
    59       if(useEstimatedValues &&
    60         (backupValues == null || backupValues.Length!=end-start)) {
     59      if (useEstimatedValues &&
     60        (backupValues == null || backupValues.Length != end - start)) {
    6161        backupValues = new double[end - start];
    62         for(int i = start; i < end; i++) {
     62        for (int i = start; i < end; i++) {
    6363          backupValues[i - start] = dataset.GetValue(i, targetVariable);
    6464        }
     
    7272
    7373      // restore the values of the target variable from the backup array if necessary
    74       if(useEstimatedValues) {
    75         for(int i = start; i < end; i++) {
     74      if (useEstimatedValues) {
     75        for (int i = start; i < end; i++) {
    7676          dataset.SetValue(i, targetVariable, backupValues[i - start]);
    7777        }
     
    7979
    8080      // update the value of total evaluated nodes
    81       scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end-start);
     81      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end - start);
    8282      return null;
    8383    }
Note: See TracChangeset for help on using the changeset viewer.