Changeset 15189 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs
- Timestamp:
- 07/10/17 21:36:03 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/BenchmarkSuitePushSolutionView.cs
r15032 r15189 53 53 var example = Evaluator.Data.Examples[exampleComboBox.SelectedIndex]; 54 54 55 interpreter.BooleanStack.Push(example.InputBoolean); 56 interpreter.IntegerStack.Push(example.InputInteger); 57 interpreter.FloatStack.Push(example.InputFloat); 58 interpreter.CharStack.Push(example.InputChar); 59 interpreter.StringStack.Push(example.InputString); 60 interpreter.IntegerVectorStack.Push(example.InputIntegerVector.Select(x => x.ToList()).ToArray()); 61 interpreter.FloatVectorStack.Push(example.InputFloatVector.Select(x => x.ToList()).ToArray()); 62 interpreter.StringVectorStack.Push(example.InputStringVector.Select(x => x.ToList()).ToArray()); 63 interpreter.BooleanVectorStack.Push(example.InputBooleanVector.Select(x => x.ToList()).ToArray()); 55 interpreter.SetInput( 56 integers: example.InputInteger, 57 floats: example.InputFloat, 58 booleans: example.InputBoolean, 59 chars: example.InputChar, 60 strings: example.InputString, 61 integerVectors: example.InputIntegerVector, 62 floatVectors: example.InputFloatVector, 63 stringVectors: example.InputStringVector); 64 65 //interpreter.BooleanStack.Push(example.InputBoolean); 66 //interpreter.IntegerStack.Push(example.InputInteger); 67 //interpreter.FloatStack.Push(example.InputFloat); 68 //interpreter.CharStack.Push(example.InputChar); 69 //interpreter.StringStack.Push(example.InputString); 70 //interpreter.IntegerVectorStack.Push(example.InputIntegerVector.Select(x => x.ToList()).ToList()); 71 //interpreter.FloatVectorStack.Push(example.InputFloatVector.Select(x => x.ToList()).ToList()); 72 //interpreter.StringVectorStack.Push(example.InputStringVector.Select(x => x.ToList()).ToList()); 73 //interpreter.BooleanVectorStack.Push(example.InputBooleanVector.Select(x => x.ToList()).ToList()); 64 74 } 65 75 … … 198 208 var type = data.OutputArgumentTypes[j]; 199 209 var offset = outputArgumentCountDict[type]; 210 211 // estimated 200 212 row.Cells[data.InputArgumentTypes.Length + j * 2].Value = ViewHelper.StringifyOutput(type, offset, Content.Config.FloatStringFormat, example, Separator); 213 214 // output 201 215 row.Cells[data.InputArgumentTypes.Length + j * 2 + 1].Value = StringifyResult(type, offset, pushInterpreter, example, Separator); 216 202 217 outputArgumentCountDict[type]++; 203 218 } … … 243 258 244 259 case ExampleArgumentType.Print: 245 return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack. Take(example.OutputPrintLineCount)));260 return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack.AsStrings().Take(example.OutputPrintLineCount))); 246 261 247 262 case ExampleArgumentType.String:
Note: See TracChangeset
for help on using the changeset viewer.