Last change
on this file since 15189 was
15189,
checked in by pkimmesw, 7 years ago
|
#2665 Fixed small issues, testet benchmark suite, added INX Expressions
|
File size:
1.4 KB
|
Line | |
---|
1 | using System;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Problems.ProgramSynthesis.Push.Extensions {
|
---|
4 | using HeuristicLab.BenchmarkSuite;
|
---|
5 | using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
|
---|
6 | using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
|
---|
7 |
|
---|
8 | public static class ProblemDataExtensions {
|
---|
9 | public static void InitInExpressions(this ProblemData data, IEnabledExpressionsConfiguration config) {
|
---|
10 | if (data.TotalIntputArgumentCount >= 1) config.EnableExpression<In1Expression>();
|
---|
11 | if (data.TotalIntputArgumentCount >= 2) config.EnableExpression<In2Expression>();
|
---|
12 | if (data.TotalIntputArgumentCount >= 3) config.EnableExpression<In3Expression>();
|
---|
13 | if (data.TotalIntputArgumentCount >= 4) config.EnableExpression<In4Expression>();
|
---|
14 | if (data.TotalIntputArgumentCount >= 5) config.EnableExpression<In5Expression>();
|
---|
15 | if (data.TotalIntputArgumentCount >= 6) config.EnableExpression<In6Expression>();
|
---|
16 | if (data.TotalIntputArgumentCount >= 7) config.EnableExpression<In7Expression>();
|
---|
17 | if (data.TotalIntputArgumentCount >= 8) config.EnableExpression<In8Expression>();
|
---|
18 | if (data.TotalIntputArgumentCount >= 9) config.EnableExpression<In9Expression>();
|
---|
19 | if (data.TotalIntputArgumentCount == 10) config.EnableExpression<In10Expression>();
|
---|
20 |
|
---|
21 | if (data.TotalIntputArgumentCount > 10)
|
---|
22 | throw new InvalidOperationException("More input arguments defined as InExpressions types");
|
---|
23 | }
|
---|
24 | }
|
---|
25 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.