Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/01/17 09:28:34 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed Benchmark Problem Definition, Converted LoopExpressions to stateless expressions, Added several unit test to ensure funcionality, Fixed UI bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs

    r14952 r15017  
    1010  using HeuristicLab.BenchmarkSuite.Views;
    1111  using HeuristicLab.Common;
     12  using HeuristicLab.Problems.ProgramSynthesis.Push.Constants;
    1213
    1314  using Interpreter;
     
    237238
    238239        case ExampleArgumentType.Print:
    239           var requiredLines = example.OutputPrint.Split(new[] { Environment.NewLine }, StringSplitOptions.None).Length;
    240           var count = Math.Min(requiredLines, interpreter.PrintStack.Count);
    241           return string.Join(valueSeparator, string.Join(Environment.NewLine, interpreter.PrintStack.Peek(count)));
     240          return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack.Take(example.OutputPrintLineCount)));
    242241
    243242        case ExampleArgumentType.String:
     
    257256    }
    258257
    259     private static string GetVectorEntryAsString<T>(int offset, IPushStack<List<T>> vectorStack) {
     258    private static string GetVectorEntryAsString<T>(int offset, IPushStack<IReadOnlyList<T>> vectorStack) {
    260259      return vectorStack.Count > offset
    261260       ? "[" + string.Join(",", vectorStack[offset]) + "]"
    262261       : string.Empty;
    263     }
    264 
    265     private int GetCount<T>(IPushStack<T> stack, T[] data) {
    266       return Math.Max(0, Math.Min(data.Length, stack.Count));
    267     }
    268 
    269     private int GetVectorCount<T>(IPushStack<List<T>> stack, T[][] data) {
    270       return Math.Max(0, Math.Min(data.Length, stack.Count));
    271262    }
    272263
Note: See TracChangeset for help on using the changeset viewer.