Changeset 14909 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views
- Timestamp:
- 05/03/17 01:31:10 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/ViewHelper.cs
r14898 r14909 1 1 namespace HeuristicLab.BenchmarkSuite.Views { 2 using System.Linq; 3 2 4 public static class ViewHelper { 3 5 public static string StringifyInput(ExampleArgumentType type, Example example, string valueSeparator) { 4 6 switch (type) { 5 7 case ExampleArgumentType.Integer: return string.Join(valueSeparator, example.InputInteger); 6 //case ExampleArgumentType.IntegerVector: return string.Join(valueSeparator, example.InputInteger);8 case ExampleArgumentType.IntegerVector: return "[" + string.Join("], [", example.InputIntegerVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 7 9 8 10 case ExampleArgumentType.Float: return string.Join(valueSeparator, example.InputFloat); 9 //case ExampleArgumentType.FloatVector: return string.Join(valueSeparator, example.InputFloat);11 case ExampleArgumentType.FloatVector: return "[" + string.Join("], [", example.InputFloatVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 10 12 11 13 case ExampleArgumentType.Boolean: return string.Join(valueSeparator, example.InputBoolean); … … 13 15 14 16 case ExampleArgumentType.String: return string.Join(valueSeparator, example.InputString); 15 //case ExampleArgumentType.StringVector: return string.Join(valueSeparator, example.InputString);17 case ExampleArgumentType.StringVector: return "[" + string.Join("], [", example.InputStringVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 16 18 default: return string.Empty; 17 19 } … … 21 23 switch (type) { 22 24 case ExampleArgumentType.Integer: return string.Join(valueSeparator, example.OutputInteger); 23 //case ExampleArgumentType.IntegerVector: return string.Join(valueSeparator, example.OutputIntegerVector);25 case ExampleArgumentType.IntegerVector: return "[" + string.Join("], [", example.OutputIntegerVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 24 26 25 27 case ExampleArgumentType.Float: return string.Join(valueSeparator, example.OutputFloat); 26 //case ExampleArgumentType.FloatVector: return string.Join(valueSeparator, example.OutputFloat);28 case ExampleArgumentType.FloatVector: return "[" + string.Join("], [", example.OutputFloatVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 27 29 28 30 case ExampleArgumentType.Boolean: return string.Join(valueSeparator, example.OutputBoolean); … … 30 32 31 33 case ExampleArgumentType.String: return string.Join(valueSeparator, example.OutputString); 32 //case ExampleArgumentType.StringVector: return string.Join(valueSeparator, example.OutputString); 34 case ExampleArgumentType.Print: return string.Join(valueSeparator, example.OutputPrint); 35 case ExampleArgumentType.StringVector: return "[" + string.Join("], [", example.OutputStringVector.Select(vector => string.Join(valueSeparator, vector))) + "]"; 36 33 37 default: return string.Empty; 34 38 } … … 42 46 private const string CharColumnHeader = "char"; 43 47 private const string StringColumnHeader = "string"; 48 private const string PrintColumnHeader = "print"; 44 49 private const string StringsColumnHeader = "string[]"; 45 50 public static string GetHeaderTypeName(ExampleArgumentType type) { … … 50 55 case ExampleArgumentType.Char: return CharColumnHeader; 51 56 case ExampleArgumentType.String: return StringColumnHeader; 57 case ExampleArgumentType.Print: return PrintColumnHeader; 52 58 case ExampleArgumentType.IntegerVector: return IntegersColumnHeader; 53 59 case ExampleArgumentType.FloatVector: return DoublesColumnHeader;
Note: See TracChangeset
for help on using the changeset viewer.