-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathF2.cpp
More file actions
41 lines (32 loc) · 683 Bytes
/
F2.cpp
File metadata and controls
41 lines (32 loc) · 683 Bytes
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
#include "F2.h"
F2::F2():Benchmarks(){
Ovector = NULL;
minX = -5;
maxX = 5;
ID = 2;
anotherz = new double[dimension];
}
F2::~F2(){
delete[] Ovector;
delete[] anotherz;
}
double F2::compute(double* x){
int i;
double result;
if(Ovector == NULL) {
// Ovector = createShiftVector(dimension,minX,maxX);
Ovector = readOvector();
}
for(i = 0; i < dimension; i++) {
anotherz[i] = x[i] - Ovector[i];
}
// // T_{osz}
// transform_osz(anotherz, dimension);
// // T_{asy}^{0.2}
// transform_asy(anotherz, 0.2);
// // lambda
// Lambda(anotherz, 10);
result = rastrigin(anotherz,dimension);
update(result);
return(result);
}