Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/16 10:16:17 (8 years ago)
Author:
bburlacu
Message:

#2635: Small cosmetic refactor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/SymbolicRegressionSingleObjectiveOSGAEvaluator.cs

    r14280 r14281  
    302302          calculator.Reset();
    303303          // save estimated values into the list (for caching)
    304           int j = i;
    305304          int end = Math.Min(trainingPartitionSize, i + interval);
    306           while (j < end && e.MoveNext()) {
     305          for (int j = i; j < end && e.MoveNext(); ++j) {
    307306            estimated.Add(e.Current);
    308             j++;
    309307          }
    310308          var start = problemData.TrainingPartition.Start;
    311309          // add (estimated, target) pairs to the calculator
    312           for (j = 0; j < end; ++j) {
     310          for (int j = 0; j < end; ++j) {
    313311            var index = j + start;
    314312            calculator.Add(targetValues[index], estimated[j]);
    315313          }
    316314          // add (target, target) pairs to the calculator (simulate perfect correlation on the remaining rows)
    317           for (; j < trainingPartitionSize; ++j) {
     315          for (int j = end; j < trainingPartitionSize; ++j) {
    318316            var index = j + start;
    319317            var v = targetValues[index];
Note: See TracChangeset for help on using the changeset viewer.