@@ -12,7 +12,9 @@ public class SimpleB1 extends SimpleProblemBinary {
|
||||
double[] result = new double[1];
|
||||
int fitness = 0;
|
||||
|
||||
for (int i = 0; i < getProblemDimension(); i++) if (b.get(i)) fitness++;
|
||||
for (int i = 0; i < getProblemDimension(); i++) {
|
||||
if (b.get(i)) fitness++;
|
||||
}
|
||||
result[0] = fitness;
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user