Cleanup as well as moving TipText methods to useful @Parameter
annotations.
This commit is contained in:
parent
6bb4616763
commit
173ebd67c6
@ -1,5 +1,7 @@
|
||||
package eva2.optimization.individuals;
|
||||
|
||||
import eva2.util.annotation.Parameter;
|
||||
|
||||
/**
|
||||
* This interface gives access to a double phenotype and except
|
||||
* for problemspecific operators should only be used by the
|
||||
@ -28,6 +30,7 @@ public interface InterfaceDataTypeDouble {
|
||||
*
|
||||
* @param range The new range for the double data.
|
||||
*/
|
||||
@Parameter(name = "range", description = "The initialization range for the individual.")
|
||||
public void setDoubleRange(double[][] range);
|
||||
|
||||
/**
|
||||
|
@ -1422,7 +1422,7 @@ public class ParticleSwarmOptimization extends AbstractOptimizer implements java
|
||||
/**
|
||||
* Randomly assign groups of size groupSize.
|
||||
*
|
||||
* @param links
|
||||
* @param pop
|
||||
* @param groupSize
|
||||
*/
|
||||
private Vector<int[]> regroupSwarm(Population pop, int groupSize) {
|
||||
@ -1680,7 +1680,7 @@ public class ParticleSwarmOptimization extends AbstractOptimizer implements java
|
||||
/**
|
||||
* This method allows you to choose the topology type.
|
||||
*
|
||||
* @param s The type.
|
||||
* @param t The type.
|
||||
*/
|
||||
public void setTopology(PSOTopology t) {
|
||||
this.topology = t;
|
||||
|
@ -274,9 +274,7 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
||||
* @return
|
||||
*/
|
||||
public static Matrix initializeDefaultRotationMatrix(double rotAngle, int dim) {
|
||||
Matrix rotation = null;
|
||||
rotation = Mathematics.getRotationMatrix((rotAngle * Math.PI / 180.), dim).transpose();
|
||||
return rotation;
|
||||
return Mathematics.getRotationMatrix((rotAngle * Math.PI / 180.), dim).transpose();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -498,28 +496,22 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
||||
return constraintArray;
|
||||
}
|
||||
|
||||
@Parameter(description = "Add constraints to the problem.")
|
||||
public void setConstraints(AbstractConstraint[] constrArray) {
|
||||
this.constraintArray = constrArray;
|
||||
}
|
||||
|
||||
public String constraintsTipText() {
|
||||
return "Add constraints to the problem.";
|
||||
}
|
||||
|
||||
public boolean isWithConstraints() {
|
||||
return withConstraints;
|
||||
}
|
||||
|
||||
@Parameter(description = "(De-)Activate constraints for the problem.")
|
||||
public void setWithConstraints(boolean withConstraints) {
|
||||
this.withConstraints = withConstraints;
|
||||
GenericObjectEditor.setShowProperty(this.getClass(), "constraints",
|
||||
withConstraints);
|
||||
}
|
||||
|
||||
public String withConstraintsTipText() {
|
||||
return "(De-)Activate constraints for the problem.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdditionalDataHeader() {
|
||||
String[] superHeader = super.getAdditionalDataHeader();
|
||||
|
@ -13,8 +13,7 @@ public final class ToolBox {
|
||||
/**
|
||||
* Private constructor to prevent instances of module class.
|
||||
*/
|
||||
private ToolBox() {
|
||||
}
|
||||
private ToolBox() {}
|
||||
|
||||
/**
|
||||
* Convert all items of an enum to a String array and append the given String array at the end.
|
||||
|
@ -10,7 +10,9 @@ import eva2.tools.math.interpolation.SplineInterpolation;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Mathematics {
|
||||
public final class Mathematics {
|
||||
private Mathematics() {}
|
||||
|
||||
/**
|
||||
* Computes the full adjoint matrix.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user