Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/17 01:31:10 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed VectorExpression errors, Fixed BenchmarkSuite Problem Data View issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/VectorSubExpressions.cs

    r14875 r14909  
    1616      if (vectorStack.IsEmpty || interpreter.IntegerStack.Count < 2) return false;
    1717
    18       var first = (int)Math.Min(vectorStack.Count, Math.Max(0, interpreter.IntegerStack[1]));
    19       var second = (int)Math.Min(vectorStack.Count, Math.Max(first, interpreter.IntegerStack.Top));
     18      var first = (int)Math.Min(vectorStack.Top.Count, Math.Max(0, interpreter.IntegerStack[1]));
     19      var second = (int)Math.Min(vectorStack.Top.Count, Math.Max(first, interpreter.IntegerStack.Top));
    2020      interpreter.IntegerStack.Remove(2);
    2121
     22      if (vectorStack.Top.Count == 0)
     23        return true;
     24
    2225      var result = vectorStack.Top.GetRange(first, second - first);
    23       vectorStack.Push(result);
     26      vectorStack.SetTop(result);
    2427      return true;
    2528    }
Note: See TracChangeset for help on using the changeset viewer.