Last change
on this file since 14909 was
14909,
checked in by pkimmesw, 8 years ago
|
#2665 Fixed VectorExpression errors, Fixed BenchmarkSuite Problem Data View issues
|
File size:
1.6 KB
|
Line | |
---|
1 | namespace HeuristicLab.BenchmarkSuite.Problems {
|
---|
2 | public class EvenSquares : BenchmarkSuiteDataDescriptor {
|
---|
3 | private const string name = "Even Sqaures";
|
---|
4 | private const string fileName = "EvenSquares.csv";
|
---|
5 | private const string description = " Given an integer n, print all of the positive even perfect squares less than n on separate lines.";
|
---|
6 |
|
---|
7 | protected override string FileName { get { return fileName; } }
|
---|
8 | public override string Name { get { return name; } }
|
---|
9 | public override string Description { get { return description; } }
|
---|
10 | protected override int InputArgumentCount { get { return 1; } }
|
---|
11 | protected override int OutputArgumentCount { get { return 1; } }
|
---|
12 |
|
---|
13 | public override ProblemData CreateProblemData() {
|
---|
14 | return new ProblemData {
|
---|
15 | Name = Name,
|
---|
16 | Description = Description,
|
---|
17 | Examples = CloneExamples(),
|
---|
18 | BestResult = 0,
|
---|
19 | WorstResult = 400,
|
---|
20 | InputArgumentTypes = new[] { ExampleArgumentType.Integer },
|
---|
21 | OutputArgumentTypes = new[] { ExampleArgumentType.Print },
|
---|
22 | TrainingCount = 100,
|
---|
23 | TestCount = 1000,
|
---|
24 | EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Print,
|
---|
25 | MaxSize = 400,
|
---|
26 | EvalLimit = 2000,
|
---|
27 | };
|
---|
28 | }
|
---|
29 |
|
---|
30 | protected override Example ParseExample(string[] input, string[] output) {
|
---|
31 | return new Example {
|
---|
32 | InputArgs = input,
|
---|
33 | OutputArgs = output,
|
---|
34 | InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
|
---|
35 | OutputPrint = output[0],
|
---|
36 | };
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.