Minor cleanup

refs #61
This commit is contained in:
Fabian Becker 2015-12-22 15:14:04 +01:00
parent 0da8ebafdc
commit 3133652cd2
3 changed files with 7 additions and 11 deletions

View File

@ -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.";
}
}

View File

@ -23,8 +23,7 @@ public class EvaluationTerminator implements InterfaceTerminator,
*/
protected int maxFitnessCalls = 1000;
public EvaluationTerminator() {
}
public EvaluationTerminator() {}
@Override
public void initialize(InterfaceOptimizationProblem prob) {

View File

@ -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;