@@ -7,6 +7,7 @@ public class SimpleB1 extends SimpleProblemBinary {
|
||||
return "A simple B1 implementation, minimize bits in a binary vector.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[] eval(BitSet b) {
|
||||
double[] result = new double[1];
|
||||
int fitness = 0;
|
||||
@@ -16,6 +17,7 @@ public class SimpleB1 extends SimpleProblemBinary {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProblemDimension() {
|
||||
return 20;
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ public class SimpleF1 extends SimpleProblemDouble {
|
||||
return "A simple F1 implementation, find the minimum of a hyper parabola.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[] eval(double[] x) {
|
||||
double res[] = new double[1];
|
||||
// this defines the dimension of the fitness vector, which should be always the same
|
||||
@@ -21,6 +22,7 @@ public class SimpleF1 extends SimpleProblemDouble {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProblemDimension() {
|
||||
return 20;
|
||||
}
|
||||
|
Reference in New Issue
Block a user