Commit 3133652c authored by Fabian Becker's avatar Fabian Becker

Minor cleanup

refs #61
parent 0da8ebaf
......@@ -3,6 +3,7 @@ package eva2.optimization.operator.selection;
import eva2.optimization.individuals.AbstractEAIndividual;
import eva2.optimization.population.Population;
import eva2.util.annotation.Description;
import eva2.util.annotation.Parameter;
/**
* Simple method to select all.
......@@ -14,8 +15,7 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
private boolean obeyDebsConstViolationPrinciple = true;
public SelectAll() {
}
public SelectAll() {}
public SelectAll(SelectAll a) {
this.obeyDebsConstViolationPrinciple = a.obeyDebsConstViolationPrinciple;
......@@ -41,7 +41,7 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
/**
* This method will select one Individual from the given
* Population in respect to the selection propability of the
* Population in respect to the selection probability of the
* individual.
*
* @param population The source population where to select from
......@@ -105,6 +105,7 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
* @param b The new state
*/
@Override
@Parameter(description = "Toggle the use of Deb's constraint violation principle.")
public void setObeyDebsConstViolationPrinciple(boolean b) {
this.obeyDebsConstViolationPrinciple = b;
}
......@@ -112,8 +113,4 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
public boolean getObeyDebsConstViolationPrinciple() {
return this.obeyDebsConstViolationPrinciple;
}
public String obeyDebsConstViolationPrincipleToolTip() {
return "Toggle the use of Deb's coonstraint violation principle.";
}
}
......@@ -23,8 +23,7 @@ public class EvaluationTerminator implements InterfaceTerminator,
*/
protected int maxFitnessCalls = 1000;
public EvaluationTerminator() {
}
public EvaluationTerminator() {}
@Override
public void initialize(InterfaceOptimizationProblem prob) {
......
......@@ -44,8 +44,8 @@ public class FitnessValueTerminator implements InterfaceTerminator,
}
@Override
public boolean isTerminated(PopulationInterface Pop) {
double[] fit = Pop.getBestFitness();
public boolean isTerminated(PopulationInterface pop) {
double[] fit = pop.getBestFitness();
for (int i = 0; i < fit.length; i++) {
if (fitnessValue[i] < fit[i]) {
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment