-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
number_of_functions.h
56 lines (53 loc) · 1.77 KB
/
number_of_functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* This function finds the number of functions in each of the amosaParams->c_problem functions*/
#include <stdlib.h>
#include "amosa.h"
int number_of_functions(AMOSAType *amosaParams)
{
int value;
if (!strcmp(amosaParams->c_problem, "ZDT1"))
value=2;
else if(!strcmp(amosaParams->c_problem,"ZDT2"))
value=2;
else if(!strcmp(amosaParams->c_problem,"ZDT3"))
value=2;
else if(!strcmp(amosaParams->c_problem,"ZDT6"))
value=2;
else if(!strcmp(amosaParams->c_problem,"SCH1"))
value=2;
else if(!strcmp(amosaParams->c_problem,"SCH2"))
value=2;
else if(!strcmp(amosaParams->c_problem,"Dev1"))
value=2;
else if(!strcmp(amosaParams->c_problem,"Dev2"))
value=2;
else if(!strcmp(amosaParams->c_problem,"Dev3"))
value=2;
else if(!strcmp(amosaParams->c_problem,"Dev4"))
value=2;
else if(!strcmp(amosaParams->c_problem,"DTLZ1"))
value=3;
else if(!strcmp(amosaParams->c_problem,"DTLZ2"))
value=3;
else if(!strcmp(amosaParams->c_problem,"DTLZ3"))
value=3;
else if(!strcmp(amosaParams->c_problem,"DTLZ4"))
value=3;
else if(!strcmp(amosaParams->c_problem,"DTLZ24"))
value=4;
else if(!strcmp(amosaParams->c_problem,"DTLZ5"))
value=3;
else if(!strcmp(amosaParams->c_problem,"DTLZ7"))
value=3;
else if (!strcmp(amosaParams->c_problem,"DTLZ15"))
value=5;
else if (!strcmp(amosaParams->c_problem,"DTLZ110"))
value=10;
else if (!strcmp(amosaParams->c_problem,"DTLZ115"))
value=15;
else
{
printf("Invalid argument for test amosaParams->c_problem given. Exiting.\n");
exit(-1);
}
return value;
}