Automated code cleanup with IntelliJ 15

This commit is contained in:
Fabian Becker 2015-11-30 12:43:10 +01:00
parent 0132c09c69
commit 2f2f935294
102 changed files with 310 additions and 396 deletions

View File

@ -14,19 +14,19 @@ public interface InterfaceSelectablePointIcon {
* *
* @param a The selection listener * @param a The selection listener
*/ */
public void addSelectionListener(InterfaceRefSolutionListener a); void addSelectionListener(InterfaceRefSolutionListener a);
/** /**
* This method allows to remove the selection listner to the PointIcon * This method allows to remove the selection listner to the PointIcon
*/ */
public void removeSelectionListeners(); void removeSelectionListeners();
/** /**
* This method returns the selection listner to the PointIcon * This method returns the selection listner to the PointIcon
* *
* @return InterfacePointIconSelectionListener * @return InterfacePointIconSelectionListener
*/ */
public InterfaceRefSolutionListener getSelectionListener(); InterfaceRefSolutionListener getSelectionListener();
/** /**
* Of course the PointIcon needs a reference to the individual * Of course the PointIcon needs a reference to the individual
@ -34,12 +34,12 @@ public interface InterfaceSelectablePointIcon {
* *
* @param indy * @param indy
*/ */
public void setEAIndividual(AbstractEAIndividual indy); void setEAIndividual(AbstractEAIndividual indy);
/** /**
* This method allows you to get the EAIndividual the icon stands for * This method allows you to get the EAIndividual the icon stands for
* *
* @return AbstractEAIndividual * @return AbstractEAIndividual
*/ */
public AbstractEAIndividual getEAIndividual(); AbstractEAIndividual getEAIndividual();
} }

View File

@ -8,5 +8,5 @@ import javax.swing.*;
* @author mkron * @author mkron
*/ */
public interface PanelMaker { public interface PanelMaker {
public JComponent makePanel(); JComponent makePanel();
} }

View File

@ -4,5 +4,5 @@ package eva2.gui.editor;
* *
*/ */
public interface ComponentFilter { public interface ComponentFilter {
public boolean accept(java.awt.Component component); boolean accept(java.awt.Component component);
} }

View File

@ -14,7 +14,7 @@ package eva2.gui.plot;
* IMPORTS * IMPORTS
*==========================================================================*/ *==========================================================================*/
public interface DataViewerInterface { public interface DataViewerInterface {
public Graph getNewGraph(String InfoString); Graph getNewGraph(String InfoString);
public void init(); void init();
} }

View File

@ -7,21 +7,21 @@ import eva2.problems.InterfaceOptimizationProblem;
* *
*/ */
public interface InterfaceDPointWithContent { public interface InterfaceDPointWithContent {
public void setEAIndividual(AbstractEAIndividual indy); void setEAIndividual(AbstractEAIndividual indy);
public AbstractEAIndividual getEAIndividual(); AbstractEAIndividual getEAIndividual();
/** /**
* This method allows you to set the according optimization problem * This method allows you to set the according optimization problem
* *
* @param problem InterfaceOptimizationProblem * @param problem InterfaceOptimizationProblem
*/ */
public void setProblem(InterfaceOptimizationProblem problem); void setProblem(InterfaceOptimizationProblem problem);
public InterfaceOptimizationProblem getProblem(); InterfaceOptimizationProblem getProblem();
/** /**
* This method allows you to draw additional data of the individual * This method allows you to draw additional data of the individual
*/ */
public void showIndividual(); void showIndividual();
} }

View File

@ -1,7 +1,7 @@
package eva2.gui.plot; package eva2.gui.plot;
public interface PlotInterface { public interface PlotInterface {
public void setConnectedPoint(double x, double y, int GraphLabel); void setConnectedPoint(double x, double y, int GraphLabel);
/** /**
* Add two graphs to form an average graph * Add two graphs to form an average graph
@ -10,25 +10,25 @@ public interface PlotInterface {
* @param g2 graph object two * @param g2 graph object two
* @param forceAdd if the graph mismatch in point counts, try to add them anyway in a useful manner. * @param forceAdd if the graph mismatch in point counts, try to add them anyway in a useful manner.
*/ */
public void addGraph(int g1, int g2, boolean forceAdd); void addGraph(int g1, int g2, boolean forceAdd);
public void setUnconnectedPoint(double x, double y, int GraphLabel); void setUnconnectedPoint(double x, double y, int GraphLabel);
public void clearAll(); void clearAll();
public void clearGraph(int GraphNumber); void clearGraph(int GraphNumber);
public void setInfoString(int GraphLabel, String Info, float stroke); void setInfoString(int GraphLabel, String Info, float stroke);
public void jump(); void jump();
public String getName(); String getName();
public int getPointCount(int graphLabel); int getPointCount(int graphLabel);
// public FunctionArea getFunctionArea(); // this is bad for RMI // public FunctionArea getFunctionArea(); // this is bad for RMI
public boolean isValid(); boolean isValid();
public void init(); void init();
} }

View File

@ -16,7 +16,7 @@ import eva2.optimization.modules.ModuleAdapter;
*/ */
public interface EvAMainAdapter { public interface EvAMainAdapter {
public String[] getModuleNameList(); String[] getModuleNameList();
// returns the corresponding ModuleAdapter // returns the corresponding ModuleAdapter
ModuleAdapter getModuleAdapter(String selectedModuleName); ModuleAdapter getModuleAdapter(String selectedModuleName);

View File

@ -8,5 +8,5 @@ public interface InterfaceNotifyOnInformers {
/** /**
* Notify the object about informer instances. * Notify the object about informer instances.
*/ */
public void setInformers(List<InterfaceAdditionalPopulationInformer> informers); void setInformers(List<InterfaceAdditionalPopulationInformer> informers);
} }

View File

@ -200,10 +200,7 @@ public abstract class AbstractEAIndividual implements IndividualInterface, java.
if (!this.mutationOperator.equals(indy.mutationOperator)) { if (!this.mutationOperator.equals(indy.mutationOperator)) {
return false; return false;
} }
if (!this.crossoverOperator.equals(indy.crossoverOperator)) { return this.crossoverOperator.equals(indy.crossoverOperator);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -61,10 +61,7 @@ public class GAESIndividualBinaryDoubleData extends AbstractEAIndividual impleme
if (!((AbstractEAIndividual) this.doubleIndividual).equalGenotypes((AbstractEAIndividual) indy.doubleIndividual)) { if (!((AbstractEAIndividual) this.doubleIndividual).equalGenotypes((AbstractEAIndividual) indy.doubleIndividual)) {
return false; return false;
} }
if (!((AbstractEAIndividual) this.binaryIndividual).equalGenotypes((AbstractEAIndividual) indy.binaryIndividual)) { return ((AbstractEAIndividual) this.binaryIndividual).equalGenotypes((AbstractEAIndividual) indy.binaryIndividual);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -78,10 +78,7 @@ public class GAIndividualBinaryData extends AbstractEAIndividual implements Inte
if ((this.genotype == null) || (indy.genotype == null)) { if ((this.genotype == null) || (indy.genotype == null)) {
return false; return false;
} }
if (!this.genotype.equals(indy.genotype)) { return this.genotype.equals(indy.genotype);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -57,10 +57,7 @@ public class GAPIndividualProgramData extends AbstractEAIndividual implements In
if (!((AbstractEAIndividual) this.numberData).equalGenotypes((AbstractEAIndividual) indy.numberData)) { if (!((AbstractEAIndividual) this.numberData).equalGenotypes((AbstractEAIndividual) indy.numberData)) {
return false; return false;
} }
if (!((AbstractEAIndividual) this.programData).equalGenotypes((AbstractEAIndividual) indy.programData)) { return ((AbstractEAIndividual) this.programData).equalGenotypes((AbstractEAIndividual) indy.programData);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -130,10 +130,7 @@ public class GEIndividualProgramData extends AbstractEAIndividual implements Int
if ((this.genotype == null) || (indy.genotype == null)) { if ((this.genotype == null) || (indy.genotype == null)) {
return false; return false;
} }
if (!this.genotype.equals(indy.genotype)) { return this.genotype.equals(indy.genotype);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -57,10 +57,7 @@ public class GIOBGAIndividualIntegerPermutationData extends AbstractEAIndividual
if (!((AbstractEAIndividual) this.integerData).equalGenotypes((AbstractEAIndividual) indy.integerData)) { if (!((AbstractEAIndividual) this.integerData).equalGenotypes((AbstractEAIndividual) indy.integerData)) {
return false; return false;
} }
if (!((AbstractEAIndividual) this.permutationData).equalGenotypes((AbstractEAIndividual) indy.permutationData)) { return ((AbstractEAIndividual) this.permutationData).equalGenotypes((AbstractEAIndividual) indy.permutationData);
return false;
}
return true;
} else { } else {
return false; return false;
} }

View File

@ -14,21 +14,21 @@ public interface InterfaceDataTypeBinary {
* *
* @param length The lenght of the BitSet that is to be optimized * @param length The lenght of the BitSet that is to be optimized
*/ */
public void setBinaryDataLength(int length); void setBinaryDataLength(int length);
/** /**
* This method returns the length of the binary data set * This method returns the length of the binary data set
* *
* @return The number of bits stored * @return The number of bits stored
*/ */
public int size(); int size();
/** /**
* This method allows you to read the binary data * This method allows you to read the binary data
* *
* @return BitSet representing the binary data. * @return BitSet representing the binary data.
*/ */
public BitSet getBinaryData(); BitSet getBinaryData();
/** /**
* This method allows you to read the binary data without * This method allows you to read the binary data without
@ -36,14 +36,14 @@ public interface InterfaceDataTypeBinary {
* *
* @return BitSet representing the binary data. * @return BitSet representing the binary data.
*/ */
public BitSet getBinaryDataWithoutUpdate(); BitSet getBinaryDataWithoutUpdate();
/** /**
* This method allows you to set the binary data. * This method allows you to set the binary data.
* *
* @param binaryData The new binary data. * @param binaryData The new binary data.
*/ */
public void setBinaryPhenotype(BitSet binaryData); void setBinaryPhenotype(BitSet binaryData);
/** /**
* This method allows you to set the binary data, this can be used for * This method allows you to set the binary data, this can be used for
@ -51,5 +51,5 @@ public interface InterfaceDataTypeBinary {
* *
* @param binaryData The new binary data. * @param binaryData The new binary data.
*/ */
public void setBinaryGenotype(BitSet binaryData); void setBinaryGenotype(BitSet binaryData);
} }

View File

@ -14,14 +14,14 @@ public interface InterfaceDataTypeDouble {
* *
* @param length The lenght of the double[] that is to be optimized * @param length The lenght of the double[] that is to be optimized
*/ */
public void setDoubleDataLength(int length); void setDoubleDataLength(int length);
/** /**
* This method returns the length of the double data set * This method returns the length of the double data set
* *
* @return The number of doubles stored * @return The number of doubles stored
*/ */
public int size(); int size();
/** /**
* This method will set the range of the double attributes. * This method will set the range of the double attributes.
@ -31,21 +31,21 @@ public interface InterfaceDataTypeDouble {
* @param range The new range for the double data. * @param range The new range for the double data.
*/ */
@Parameter(name = "range", description = "The initialization range for the individual.") @Parameter(name = "range", description = "The initialization range for the individual.")
public void setDoubleRange(double[][] range); void setDoubleRange(double[][] range);
/** /**
* This method will return the range for all double attributes. * This method will return the range for all double attributes.
* *
* @return The range array. * @return The range array.
*/ */
public double[][] getDoubleRange(); double[][] getDoubleRange();
/** /**
* This method allows you to read the double data * This method allows you to read the double data
* *
* @return double[] representing the double data. * @return double[] representing the double data.
*/ */
public double[] getDoubleData(); double[] getDoubleData();
/** /**
* This method allows you to read the double data without * This method allows you to read the double data without
@ -53,7 +53,7 @@ public interface InterfaceDataTypeDouble {
* *
* @return double[] representing the double data. * @return double[] representing the double data.
*/ */
public double[] getDoubleDataWithoutUpdate(); double[] getDoubleDataWithoutUpdate();
/** /**
* This method allows you to set the double data, usually the phenotype data. Consider using * This method allows you to set the double data, usually the phenotype data. Consider using
@ -61,7 +61,7 @@ public interface InterfaceDataTypeDouble {
* *
* @param doubleData The new double data. * @param doubleData The new double data.
*/ */
public void setDoublePhenotype(double[] doubleData); void setDoublePhenotype(double[] doubleData);
/** /**
* This method allows you to set the double data, this can be used for * This method allows you to set the double data, this can be used for
@ -69,5 +69,5 @@ public interface InterfaceDataTypeDouble {
* *
* @param doubleData The new double data. * @param doubleData The new double data.
*/ */
public void setDoubleGenotype(double[] doubleData); void setDoubleGenotype(double[] doubleData);
} }

View File

@ -12,14 +12,14 @@ public interface InterfaceDataTypeInteger {
* *
* @param length The lenght of the int[] that is to be optimized * @param length The lenght of the int[] that is to be optimized
*/ */
public void setIntegerDataLength(int length); void setIntegerDataLength(int length);
/** /**
* This method returns the length of the int data set * This method returns the length of the int data set
* *
* @return The number of integers stored * @return The number of integers stored
*/ */
public int size(); int size();
/** /**
* This method will set the range of the int attributes. * This method will set the range of the int attributes.
@ -28,21 +28,21 @@ public interface InterfaceDataTypeInteger {
* *
* @param range The new range for the int data. * @param range The new range for the int data.
*/ */
public void setIntRange(int[][] range); void setIntRange(int[][] range);
/** /**
* This method will return the range for all int attributes. * This method will return the range for all int attributes.
* *
* @return The range array. * @return The range array.
*/ */
public int[][] getIntRange(); int[][] getIntRange();
/** /**
* This method allows you to read the int data * This method allows you to read the int data
* *
* @return int[] representing the int data. * @return int[] representing the int data.
*/ */
public int[] getIntegerData(); int[] getIntegerData();
/** /**
* This method allows you to read the int data without * This method allows you to read the int data without
@ -50,14 +50,14 @@ public interface InterfaceDataTypeInteger {
* *
* @return int[] representing the int data. * @return int[] representing the int data.
*/ */
public int[] getIntegerDataWithoutUpdate(); int[] getIntegerDataWithoutUpdate();
/** /**
* This method allows you to set the int data. * This method allows you to set the int data.
* *
* @param intData The new int data. * @param intData The new int data.
*/ */
public void setIntPhenotype(int[] intData); void setIntPhenotype(int[] intData);
/** /**
* This method allows you to set the int data, this can be used for * This method allows you to set the int data, this can be used for
@ -65,5 +65,5 @@ public interface InterfaceDataTypeInteger {
* *
* @param intData The new int data. * @param intData The new int data.
*/ */
public void setIntGenotype(int[] intData); void setIntGenotype(int[] intData);
} }

View File

@ -13,7 +13,7 @@ public interface InterfaceDataTypePermutation {
* *
* @param length int new length * @param length int new length
*/ */
public void setPermutationDataLength(int[] length); void setPermutationDataLength(int[] length);
/** /**
@ -21,7 +21,7 @@ public interface InterfaceDataTypePermutation {
* *
* @return int * @return int
*/ */
public int[] sizePermutation(); int[] sizePermutation();
/** /**
* This method allows you to read the permutation data * This method allows you to read the permutation data
@ -36,7 +36,7 @@ public interface InterfaceDataTypePermutation {
* *
* @return int[] representing the permutation. * @return int[] representing the permutation.
*/ */
public int[][] getPermutationDataWithoutUpdate(); int[][] getPermutationDataWithoutUpdate();
/** /**
* This method allows you to set the permutation. * This method allows you to set the permutation.
@ -53,5 +53,5 @@ public interface InterfaceDataTypePermutation {
*/ */
void setPermutationGenotype(int[][] perm); void setPermutationGenotype(int[][] perm);
public void setFirstindex(int[] firstindex); void setFirstindex(int[] firstindex);
} }

View File

@ -14,14 +14,14 @@ public interface InterfaceDataTypeProgram {
* *
* @param length The lenght of the double[] that is to be optimized * @param length The lenght of the double[] that is to be optimized
*/ */
public void setProgramDataLength(int length); void setProgramDataLength(int length);
/** /**
* This method allows you to read the program stored as Koza style node tree * This method allows you to read the program stored as Koza style node tree
* *
* @return AbstractGPNode representing the binary data. * @return AbstractGPNode representing the binary data.
*/ */
public InterfaceProgram[] getProgramData(); InterfaceProgram[] getProgramData();
/** /**
* This method allows you to read the Program data without * This method allows you to read the Program data without
@ -29,33 +29,33 @@ public interface InterfaceDataTypeProgram {
* *
* @return InterfaceProgram[] representing the Program. * @return InterfaceProgram[] representing the Program.
*/ */
public InterfaceProgram[] getProgramDataWithoutUpdate(); InterfaceProgram[] getProgramDataWithoutUpdate();
/** /**
* This method allows you to set the program. * This method allows you to set the program.
* *
* @param program The new program. * @param program The new program.
*/ */
public void SetProgramPhenotype(InterfaceProgram[] program); void SetProgramPhenotype(InterfaceProgram[] program);
/** /**
* This method allows you to set the program. * This method allows you to set the program.
* *
* @param program The new program. * @param program The new program.
*/ */
public void SetProgramGenotype(InterfaceProgram[] program); void SetProgramGenotype(InterfaceProgram[] program);
/** /**
* This method allows you to set the function area * This method allows you to set the function area
* *
* @param area The area contains functions and terminals * @param area The area contains functions and terminals
*/ */
public void SetFunctionArea(Object[] area); void SetFunctionArea(Object[] area);
/** /**
* This method allows you to get the function area * This method allows you to get the function area
* *
* @return The area contains functions and terminals * @return The area contains functions and terminals
*/ */
public Object[] getFunctionArea(); Object[] getFunctionArea();
} }

View File

@ -12,20 +12,20 @@ public interface InterfaceESIndividual {
* *
* @return BitSet * @return BitSet
*/ */
public double[] getDGenotype(); double[] getDGenotype();
/** /**
* This method will allow the user to set the current ES 'genotype'. * This method will allow the user to set the current ES 'genotype'.
* *
* @param b The new genotype of the Individual * @param b The new genotype of the Individual
*/ */
public void setDGenotype(double[] b); void setDGenotype(double[] b);
/** /**
* This method will return the range for all double attributes. * This method will return the range for all double attributes.
* *
* @return The range array. * @return The range array.
*/ */
public double[][] getDoubleRange(); double[][] getDoubleRange();
} }

View File

@ -14,7 +14,7 @@ public interface InterfaceGAIndividual {
* *
* @return BitSet * @return BitSet
*/ */
public BitSet getBGenotype(); BitSet getBGenotype();
/** /**
* This method will allow the user to set the current GA genotype. * This method will allow the user to set the current GA genotype.
@ -24,7 +24,7 @@ public interface InterfaceGAIndividual {
* *
* @param b The new genotype of the Individual * @param b The new genotype of the Individual
*/ */
public void setBGenotype(BitSet b); void setBGenotype(BitSet b);
/** /**
* This method allows the user to read the length of the genotype. * This method allows the user to read the length of the genotype.
@ -33,6 +33,6 @@ public interface InterfaceGAIndividual {
* *
* @return The length of the genotype. * @return The length of the genotype.
*/ */
public int getGenotypeLength(); int getGenotypeLength();
} }

View File

@ -12,14 +12,14 @@ public interface InterfaceGIIndividual {
* *
* @param length The lenght of the int[] that is to be optimized * @param length The lenght of the int[] that is to be optimized
*/ */
public void setIntegerDataLength(int length); void setIntegerDataLength(int length);
/** /**
* This method will return the range for all int attributes. * This method will return the range for all int attributes.
* *
* @return The range array. * @return The range array.
*/ */
public int[][] getIntRange(); int[][] getIntRange();
/** /**
* This method will set the range of the int attributes. * This method will set the range of the int attributes.
@ -28,14 +28,14 @@ public interface InterfaceGIIndividual {
* *
* @param range The new range for the int data. * @param range The new range for the int data.
*/ */
public void setIntRange(int[][] range); void setIntRange(int[][] range);
/** /**
* This method will allow the user to read the GI genotype * This method will allow the user to read the GI genotype
* *
* @return BitSet * @return BitSet
*/ */
public int[] getIGenotype(); int[] getIGenotype();
/** /**
* This method will allow the user to set the current GI genotype. * This method will allow the user to set the current GI genotype.
@ -45,7 +45,7 @@ public interface InterfaceGIIndividual {
* *
* @param b The new genotype of the Individual * @param b The new genotype of the Individual
*/ */
public void setIGenotype(int[] b); void setIGenotype(int[] b);
/** /**
* This method allows the user to read the length of the genotype. * This method allows the user to read the length of the genotype.
@ -54,5 +54,5 @@ public interface InterfaceGIIndividual {
* *
* @return The length of the genotype. * @return The length of the genotype.
*/ */
public int getGenotypeLength(); int getGenotypeLength();
} }

View File

@ -13,14 +13,14 @@ public interface InterfaceGPIndividual {
* *
* @return AbstractGPNode * @return AbstractGPNode
*/ */
public AbstractGPNode[] getPGenotype(); AbstractGPNode[] getPGenotype();
/** /**
* This method will allow the user to set the current program 'genotype'. * This method will allow the user to set the current program 'genotype'.
* *
* @param b The new program genotype of the Individual * @param b The new program genotype of the Individual
*/ */
public void setPGenotype(AbstractGPNode[] b); void setPGenotype(AbstractGPNode[] b);
/** /**
* This method will allow the user to set the current program 'genotype'. * This method will allow the user to set the current program 'genotype'.
@ -28,19 +28,19 @@ public interface InterfaceGPIndividual {
* @param b The new program genotype of the Individual * @param b The new program genotype of the Individual
* @param i The index where to insert the new program * @param i The index where to insert the new program
*/ */
public void setPGenotype(AbstractGPNode b, int i); void setPGenotype(AbstractGPNode b, int i);
/** /**
* This method allows you to get the function area * This method allows you to get the function area
* *
* @return area The area contains functions and terminals * @return area The area contains functions and terminals
*/ */
public Object[] getFunctionArea(); Object[] getFunctionArea();
/** /**
* Return the maximal allowed depth of a GP tree (or -1 if it does not apply). * Return the maximal allowed depth of a GP tree (or -1 if it does not apply).
* *
* @return * @return
*/ */
public int getMaxAllowedDepth(); int getMaxAllowedDepth();
} }

View File

@ -13,7 +13,7 @@ public interface InterfaceOBGAIndividual {
* *
* @return int[] genotype * @return int[] genotype
*/ */
public int[][] getOBGenotype(); int[][] getOBGenotype();
/** /**
@ -21,5 +21,5 @@ public interface InterfaceOBGAIndividual {
* *
* @param b int[] new genotype * @param b int[] new genotype
*/ */
public void setOBGenotype(int[][] b); void setOBGenotype(int[][] b);
} }

View File

@ -17,7 +17,7 @@ public interface InterfaceGADoubleCoding {
* @param correction Enable automatic correction is enabled. * @param correction Enable automatic correction is enabled.
* @return The float value. * @return The float value.
*/ */
public double decodeValue(BitSet refBitSet, double[] range, int[] locus, boolean correction); double decodeValue(BitSet refBitSet, double[] range, int[] locus, boolean correction);
/** /**
* This method codes a given double value directly into a BitSet at * This method codes a given double value directly into a BitSet at
@ -29,5 +29,5 @@ public interface InterfaceGADoubleCoding {
* @param refBitSet The BitSet where the questioned value is stored. * @param refBitSet The BitSet where the questioned value is stored.
* @param locus The position and length on the BitSet that is to be coded. * @param locus The position and length on the BitSet that is to be coded.
*/ */
public void codeValue(double value, double[] range, BitSet refBitSet, int[] locus); void codeValue(double value, double[] range, BitSet refBitSet, int[] locus);
} }

View File

@ -18,7 +18,7 @@ public interface InterfaceGAIntegerCoding {
* @param correction Enable automatic correction is enabled. * @param correction Enable automatic correction is enabled.
* @return The float value. * @return The float value.
*/ */
public int decodeValue(BitSet refBitSet, int[] range, int[] locus, boolean correction); int decodeValue(BitSet refBitSet, int[] range, int[] locus, boolean correction);
/** /**
* This method codes a given int value directly into a BitSet at * This method codes a given int value directly into a BitSet at
@ -30,12 +30,12 @@ public interface InterfaceGAIntegerCoding {
* @param refBitSet The BitSet where the questioned value is stored. * @param refBitSet The BitSet where the questioned value is stored.
* @param locus The position and length on the BitSet that is to be coded. * @param locus The position and length on the BitSet that is to be coded.
*/ */
public void codeValue(int value, int[] range, BitSet refBitSet, int[] locus); void codeValue(int value, int[] range, BitSet refBitSet, int[] locus);
/** /**
* This method will calculate how many bits are to be used to code a given value * This method will calculate how many bits are to be used to code a given value
* *
* @param range The range for the value. * @param range The range for the value.
*/ */
public int calculateNecessaryBits(int[] range); int calculateNecessaryBits(int[] range);
} }

View File

@ -11,12 +11,12 @@ public interface InterfaceProgram {
* *
* @param environment * @param environment
*/ */
public Object evaluate(eva2.problems.InterfaceProgramProblem environment); Object evaluate(eva2.problems.InterfaceProgramProblem environment);
/** /**
* This method returns a string representation of the current program. * This method returns a string representation of the current program.
* *
* @return string * @return string
*/ */
public String getStringRepresentation(); String getStringRepresentation();
} }

View File

@ -8,13 +8,13 @@ public interface InterfaceProcessElement {
/** /**
* This method will call the initialize method and will go to stall * This method will call the initialize method and will go to stall
*/ */
public void initProcessElementParametrization(); void initProcessElementParametrization();
/** /**
* This method will wait for the parametrisation result * This method will wait for the parametrisation result
* *
* @return int Result * @return int Result
*/ */
public boolean isFinished(); boolean isFinished();
} }

View File

@ -10,5 +10,5 @@ public interface InterfaceParetoFrontView {
* the data has changed most likely due to changes in * the data has changed most likely due to changes in
* the problem definition * the problem definition
*/ */
public void updateView(); void updateView();
} }

View File

@ -10,5 +10,5 @@ public interface InterfaceRefPointListener {
* *
* @param point The selected point, most likely 2d * @param point The selected point, most likely 2d
*/ */
public void refPointGiven(double[] point); void refPointGiven(double[] point);
} }

View File

@ -13,5 +13,5 @@ public interface InterfaceRefSolutionListener {
* *
* @param indy The selected individual * @param indy The selected individual
*/ */
public void individualSelected(AbstractEAIndividual indy); void individualSelected(AbstractEAIndividual indy);
} }

View File

@ -142,11 +142,7 @@ public class ArchivingPESAII extends AbstractArchiving implements java.io.Serial
sameGrid = true; sameGrid = true;
for (int k = 0; k < tmpFit.length; k++) { for (int k = 0; k < tmpFit.length; k++) {
tmpGrid[k] = (int) ((tmpFit[k] - bounds[k][0]) / grid[k]); tmpGrid[k] = (int) ((tmpFit[k] - bounds[k][0]) / grid[k]);
if (curGrid[k] == tmpGrid[k]) { sameGrid &= curGrid[k] == tmpGrid[k];
sameGrid &= true;
} else {
sameGrid &= false;
}
} }
if (sameGrid) { if (sameGrid) {
coll.add(j); coll.add(j);
@ -159,7 +155,7 @@ public class ArchivingPESAII extends AbstractArchiving implements java.io.Serial
// now i got all the boogies of the same grid element // now i got all the boogies of the same grid element
// lets assign them their squeeze factor // lets assign them their squeeze factor
for (int j = 0; j < coll.size(); j++) { for (int j = 0; j < coll.size(); j++) {
result[(int) coll.get(j)] = coll.size(); result[coll.get(j)] = coll.size();
tmpIndy = pop.get(((Integer) coll.get(j)).intValue()); tmpIndy = pop.get(((Integer) coll.get(j)).intValue());
tmpIndy.putData("SqueezeFactor", coll.size()); tmpIndy.putData("SqueezeFactor", coll.size());
tmpIndy.putData("GridBox", curGrid); tmpIndy.putData("GridBox", curGrid);

View File

@ -12,7 +12,7 @@ public interface InterfaceArchiving {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows you to merge populations into an archive. * This method allows you to merge populations into an archive.
@ -21,5 +21,5 @@ public interface InterfaceArchiving {
* *
* @param pop The population that may add Individuals to the archive. * @param pop The population that may add Individuals to the archive.
*/ */
public void addElementsToArchive(Population pop); void addElementsToArchive(Population pop);
} }

View File

@ -14,7 +14,7 @@ public interface InterfaceInformationRetrieval {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method will allow Information Retrieval from a archive onto * This method will allow Information Retrieval from a archive onto
@ -22,6 +22,6 @@ public interface InterfaceInformationRetrieval {
* *
* @param pop The population. * @param pop The population.
*/ */
public void retrieveInformationFrom(Population pop); void retrieveInformationFrom(Population pop);
} }

View File

@ -14,7 +14,7 @@ public interface InterfaceRemoveSurplusIndividuals {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method will remove surplus individuals * This method will remove surplus individuals
@ -22,5 +22,5 @@ public interface InterfaceRemoveSurplusIndividuals {
* *
* @param archive * @param archive
*/ */
public void removeSurplusIndividuals(Population archive); void removeSurplusIndividuals(Population archive);
} }

View File

@ -10,7 +10,7 @@ public interface InterfaceClassification {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method will initialize the classificator * This method will initialize the classificator
@ -18,7 +18,7 @@ public interface InterfaceClassification {
* @param space The double[n][d] space* * @param space The double[n][d] space*
* @param type The classes [0,1,..] * @param type The classes [0,1,..]
*/ */
public void init(double[][] space, int[] type); void init(double[][] space, int[] type);
/** /**
* This method allows you to train the classificator based on * This method allows you to train the classificator based on
@ -28,7 +28,7 @@ public interface InterfaceClassification {
* @param space The double[n][d] space * @param space The double[n][d] space
* @param type The int[n] classes [0,1,..] * @param type The int[n] classes [0,1,..]
*/ */
public void train(double[][] space, int[] type); void train(double[][] space, int[] type);
/** /**
* This method will classify a given data point * This method will classify a given data point
@ -36,5 +36,5 @@ public interface InterfaceClassification {
* @param point The double[d] data point. * @param point The double[d] data point.
* @return type The resulting class. * @return type The resulting class.
*/ */
public int getClassFor(double[] point); int getClassFor(double[] point);
} }

View File

@ -180,11 +180,7 @@ public class ClusteringDensityBased implements InterfaceClusteringDistanceParam,
Population tmpPop = new Population(species1.size() + species2.size()); Population tmpPop = new Population(species1.size() + species2.size());
tmpPop.addPopulation(species1); tmpPop.addPopulation(species1);
tmpPop.addPopulation(species2); tmpPop.addPopulation(species2);
if (this.cluster(tmpPop, referencePop).length <= 2) { return this.cluster(tmpPop, referencePop).length <= 2;
return true;
} else {
return false;
}
} }
} }

View File

@ -354,11 +354,7 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
@Override @Override
public boolean mergingSpecies(Population species1, Population species2, Population referencePop) { public boolean mergingSpecies(Population species1, Population species2, Population referencePop) {
// TODO i could use the BIC metric from X-means to calculate this // TODO i could use the BIC metric from X-means to calculate this
if (metric.distance(species1.getBestEAIndividual(), species2.getBestEAIndividual()) < mergeDist) { return metric.distance(species1.getBestEAIndividual(), species2.getBestEAIndividual()) < mergeDist;
return true;
} else {
return false;
}
} }
// /** This method decides if a unclustered individual belongs to an already established species. // /** This method decides if a unclustered individual belongs to an already established species.

View File

@ -374,20 +374,12 @@ public class ClusteringNearestBetter implements InterfaceClustering, Serializabl
public boolean mergingSpecies(Population species1, Population species2, Population referenceSet) { public boolean mergingSpecies(Population species1, Population species2, Population referenceSet) {
getRefData(referenceSet, species1); getRefData(referenceSet, species1);
if (testConvergingSpeciesOnBestOnly) { if (testConvergingSpeciesOnBestOnly) {
if (this.metric.distance(species1.getBestEAIndividual(), species2.getBestEAIndividual()) < this.currentDistThreshold()) { return this.metric.distance(species1.getBestEAIndividual(), species2.getBestEAIndividual()) < this.currentDistThreshold();
return true;
} else {
return false;
}
} else { } else {
Population tmpPop = new Population(species1.size() + species2.size()); Population tmpPop = new Population(species1.size() + species2.size());
tmpPop.addPopulation(species1); tmpPop.addPopulation(species1);
tmpPop.addPopulation(species2); tmpPop.addPopulation(species2);
if (this.cluster(tmpPop, referenceSet).length <= 2) { return this.cluster(tmpPop, referenceSet).length <= 2;
return true;
} else {
return false;
}
} }
} }

View File

@ -16,7 +16,7 @@ public interface InterfaceClustering {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows you to search for clusters in a given population. The method * This method allows you to search for clusters in a given population. The method
@ -37,7 +37,7 @@ public interface InterfaceClustering {
* @param referenceSet a reference population for dynamic measures * @param referenceSet a reference population for dynamic measures
* @return Population[] * @return Population[]
*/ */
public Population[] cluster(Population pop, Population referenceSet); Population[] cluster(Population pop, Population referenceSet);
/** /**
* This method allows you to decide if two species are to be merged regarding this clustering algorithm. * This method allows you to decide if two species are to be merged regarding this clustering algorithm.
@ -51,7 +51,7 @@ public interface InterfaceClustering {
* @param referenceSet a reference population for dynamic measures * @param referenceSet a reference population for dynamic measures
* @return True if species converge, else False. * @return True if species converge, else False.
*/ */
public boolean mergingSpecies(Population species1, Population species2, Population referenceSet); boolean mergingSpecies(Population species1, Population species2, Population referenceSet);
/** /**
* Do some pre-calculations on a population for clustering. If additional population data * Do some pre-calculations on a population for clustering. If additional population data
@ -59,7 +59,7 @@ public interface InterfaceClustering {
* *
* @param pop * @param pop
*/ */
public String initClustering(Population pop); String initClustering(Population pop);
/** /**
* Try to associate a set of loners with a given set of species. Return a list * Try to associate a set of loners with a given set of species. Return a list
@ -77,5 +77,5 @@ public interface InterfaceClustering {
* @param referenceSet a reference population for dynamic measures * @param referenceSet a reference population for dynamic measures
* @return associative list matching loners to species. * @return associative list matching loners to species.
*/ */
public int[] associateLoners(Population loners, Population[] species, Population referenceSet); int[] associateLoners(Population loners, Population[] species, Population referenceSet);
} }

View File

@ -6,7 +6,7 @@ package eva2.optimization.operator.cluster;
* @author mkron * @author mkron
*/ */
public interface InterfaceClusteringDistanceParam extends InterfaceClustering { public interface InterfaceClusteringDistanceParam extends InterfaceClustering {
public double getClustDistParam(); double getClustDistParam();
public void setClustDistParam(double param); void setClustDistParam(double param);
} }

View File

@ -8,7 +8,7 @@ import eva2.optimization.operator.distancemetric.InterfaceDistanceMetric;
* @author mkron * @author mkron
*/ */
public interface InterfaceClusteringMetricBased { public interface InterfaceClusteringMetricBased {
public InterfaceDistanceMetric getMetric(); InterfaceDistanceMetric getMetric();
public void setMetric(InterfaceDistanceMetric m); void setMetric(InterfaceDistanceMetric m);
} }

View File

@ -41,11 +41,7 @@ public class ConstObjectivesInEqualityBiggerThanLinear implements InterfaceConst
if (d.length != 2) { if (d.length != 2) {
return true; return true;
} }
if ((this.m * d[0] + this.b) < d[1]) { return (this.m * d[0] + this.b) < d[1];
return true;
} else {
return false;
}
} }
} }

View File

@ -38,11 +38,7 @@ public class ConstObjectivesInEqualityBiggerThanSurface implements InterfaceCons
@Override @Override
public boolean isValid(AbstractEAIndividual indy) { public boolean isValid(AbstractEAIndividual indy) {
double[] d = indy.getFitness(); double[] d = indy.getFitness();
if (this.getScalarProduct(norm, this.getSubstraction(d, base)) >= 0) { return this.getScalarProduct(norm, this.getSubstraction(d, base)) >= 0;
return true;
} else {
return false;
}
} }
private double[] getSubstraction(double[] a, double[] b) { private double[] getSubstraction(double[] a, double[] b) {

View File

@ -41,10 +41,6 @@ public class ConstObjectivesInEqualityLesserThanLinear implements InterfaceConst
if (d.length != 2) { if (d.length != 2) {
return true; return true;
} }
if ((this.m * d[0] + this.b) > d[1]) { return (this.m * d[0] + this.b) > d[1];
return true;
} else {
return false;
}
} }
} }

View File

@ -38,11 +38,7 @@ public class ConstObjectivesInEqualitySmallerThanSurface implements InterfaceCon
@Override @Override
public boolean isValid(AbstractEAIndividual indy) { public boolean isValid(AbstractEAIndividual indy) {
double[] d = indy.getFitness(); double[] d = indy.getFitness();
if (this.getScalarProduct(norm, this.getSubstraction(d, base)) < 0) { return this.getScalarProduct(norm, this.getSubstraction(d, base)) < 0;
return true;
} else {
return false;
}
} }
private double[] getSubstraction(double[] a, double[] b) { private double[] getSubstraction(double[] a, double[] b) {

View File

@ -13,7 +13,7 @@ public interface InterfaceConstraint {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows you wether or not a given individual * This method allows you wether or not a given individual
@ -22,5 +22,5 @@ public interface InterfaceConstraint {
* @param indy The individual to check. * @param indy The individual to check.
* @return true if valid false else. * @return true if valid false else.
*/ */
public boolean isValid(AbstractEAIndividual indy); boolean isValid(AbstractEAIndividual indy);
} }

View File

@ -10,7 +10,7 @@ public interface InterfaceDoubleConstraint {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* Returns the boolean information whether the constraint is satisfied. * Returns the boolean information whether the constraint is satisfied.
@ -18,7 +18,7 @@ public interface InterfaceDoubleConstraint {
* @param indyX * @param indyX
* @return * @return
*/ */
public boolean isSatisfied(double[] indyX); boolean isSatisfied(double[] indyX);
/** /**
* Return the absolute (positive) degree of violation or zero if the constraint * Return the absolute (positive) degree of violation or zero if the constraint
@ -27,5 +27,5 @@ public interface InterfaceDoubleConstraint {
* @param indyX possibly the decoded individual position * @param indyX possibly the decoded individual position
* @return true if valid false else. * @return true if valid false else.
*/ */
public double getViolation(double[] indyX); double getViolation(double[] indyX);
} }

View File

@ -86,11 +86,7 @@ public class CrossoverOBGAPMX implements InterfaceCrossover, java.io.Serializabl
*/ */
@Override @Override
public boolean equals(Object crossover) { public boolean equals(Object crossover) {
if (crossover instanceof CrossoverOBGAPMX) { return crossover instanceof CrossoverOBGAPMX;
return true;
} else {
return false;
}
} }
@Override @Override

View File

@ -84,11 +84,7 @@ public class CrossoverOBGAPMXUniform implements InterfaceCrossover, java.io.Seri
*/ */
@Override @Override
public boolean equals(Object crossover) { public boolean equals(Object crossover) {
if (crossover instanceof CrossoverOBGAPMXUniform) { return crossover instanceof CrossoverOBGAPMXUniform;
return true;
} else {
return false;
}
} }

View File

@ -15,7 +15,7 @@ public interface InterfaceCrossover {
* *
* @return The clone * @return The clone
*/ */
public Object clone(); Object clone();
/** /**
* This method performs crossover on two individuals. Note: the genotype of the individuals * This method performs crossover on two individuals. Note: the genotype of the individuals
@ -24,7 +24,7 @@ public interface InterfaceCrossover {
* @param indy1 The first individual * @param indy1 The first individual
* @param partners The second individual * @param partners The second individual
*/ */
public AbstractEAIndividual[] mate(AbstractEAIndividual indy1, Population partners); AbstractEAIndividual[] mate(AbstractEAIndividual indy1, Population partners);
/** /**
* This method will allow the crossover operator to be initialized depending on the * This method will allow the crossover operator to be initialized depending on the
@ -35,7 +35,7 @@ public interface InterfaceCrossover {
* @param individual The individual that will be mutated. * @param individual The individual that will be mutated.
* @param opt The optimization problem. * @param opt The optimization problem.
*/ */
public void init(AbstractEAIndividual individual, InterfaceOptimizationProblem opt); void init(AbstractEAIndividual individual, InterfaceOptimizationProblem opt);
/** /**
* This method allows you to get a string representation of the mutation * This method allows you to get a string representation of the mutation
@ -43,7 +43,7 @@ public interface InterfaceCrossover {
* *
* @return A descriptive string. * @return A descriptive string.
*/ */
public String getStringRepresentation(); String getStringRepresentation();
/** /**
* This method allows you to evaluate wether two crossover operators * This method allows you to evaluate wether two crossover operators
@ -52,5 +52,5 @@ public interface InterfaceCrossover {
* @param crossover The other crossover operator * @param crossover The other crossover operator
*/ */
@Override @Override
public boolean equals(Object crossover); boolean equals(Object crossover);
} }

View File

@ -7,7 +7,7 @@ public interface InterfaceEvaluatingCrossoverOperator extends InterfaceCrossover
* *
* @return * @return
*/ */
public int getEvaluations(); int getEvaluations();
public void resetEvaluations(); void resetEvaluations();
} }

View File

@ -16,7 +16,7 @@ public interface InterfaceDistanceMetric {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows you to compute the distance between two individuals. * This method allows you to compute the distance between two individuals.
@ -27,5 +27,5 @@ public interface InterfaceDistanceMetric {
* @param indy2 The second individual. * @param indy2 The second individual.
* @return double * @return double
*/ */
public double distance(AbstractEAIndividual indy1, AbstractEAIndividual indy2); double distance(AbstractEAIndividual indy1, AbstractEAIndividual indy2);
} }

View File

@ -14,6 +14,6 @@ public interface InterfaceFitnessModifier {
* your problem to store the unaltered fitness somewhere else so that * your problem to store the unaltered fitness somewhere else so that
* you may still fetch it! * you may still fetch it!
*/ */
public void modifyFitness(Population population); void modifyFitness(Population population);
} }

View File

@ -20,12 +20,12 @@ public interface InterfaceInitialization {
* @param indy the target individual to initialize * @param indy the target individual to initialize
* @param problem the problem instance under consideration * @param problem the problem instance under consideration
*/ */
public void initialize(AbstractEAIndividual indy, InterfaceOptimizationProblem problem); void initialize(AbstractEAIndividual indy, InterfaceOptimizationProblem problem);
/** /**
* A specific cloning method. * A specific cloning method.
* *
* @return * @return
*/ */
public InterfaceInitialization clone(); InterfaceInitialization clone();
} }

View File

@ -16,13 +16,13 @@ public interface InterfaceMigration {
/** /**
* The ever present clone method * The ever present clone method
*/ */
public Object clone(); Object clone();
/** /**
* Typically i'll need some initialization method for * Typically i'll need some initialization method for
* every bit of code i write.... * every bit of code i write....
*/ */
public void initializeMigration(InterfaceOptimizer[] islands); void initializeMigration(InterfaceOptimizer[] islands);
/** /**
* The migrate method can be called asychnronously or * The migrate method can be called asychnronously or
@ -35,5 +35,5 @@ public interface InterfaceMigration {
* you call getPopulation() on an island it is not a reference * you call getPopulation() on an island it is not a reference
* to the population but a serialized copy of the population!! * to the population but a serialized copy of the population!!
*/ */
public void migrate(InterfaceOptimizer[] islands); void migrate(InterfaceOptimizer[] islands);
} }

View File

@ -16,7 +16,7 @@ public interface InterfaceMOSOConverter {
* *
* @return the clone * @return the clone
*/ */
public Object clone(); Object clone();
/** /**
* This method takes a population of individuals with an array of * This method takes a population of individuals with an array of
@ -27,7 +27,7 @@ public interface InterfaceMOSOConverter {
* *
* @param pop The population to process. * @param pop The population to process.
*/ */
public void convertMultiObjective2SingleObjective(Population pop); void convertMultiObjective2SingleObjective(Population pop);
/** /**
* This method allows the problem to set the current output size of * This method allows the problem to set the current output size of
@ -36,14 +36,14 @@ public interface InterfaceMOSOConverter {
* *
* @param dim output dimension * @param dim output dimension
*/ */
public void setOutputDimension(int dim); void setOutputDimension(int dim);
/** /**
* This method processes a single individual * This method processes a single individual
* *
* @param indy The individual to process. * @param indy The individual to process.
*/ */
public void convertSingleIndividual(AbstractEAIndividual indy); void convertSingleIndividual(AbstractEAIndividual indy);
/** /**
* This method allows the CommonJavaObjectEditorPanel to read the * This method allows the CommonJavaObjectEditorPanel to read the
@ -51,12 +51,12 @@ public interface InterfaceMOSOConverter {
* *
* @return The name. * @return The name.
*/ */
public String getName(); String getName();
/** /**
* This method returns a description of the objective * This method returns a description of the objective
* *
* @return A String * @return A String
*/ */
public String getStringRepresentation(); String getStringRepresentation();
} }

View File

@ -17,7 +17,7 @@ public interface InterfaceAdaptOperatorGenerational {
* @param oldPop the initial population for the developmental step * @param oldPop the initial population for the developmental step
* @param selectedPop the sup-population selected as parents for the new generation * @param selectedPop the sup-population selected as parents for the new generation
*/ */
public void adaptAfterSelection(Population oldPop, Population selectedPop); void adaptAfterSelection(Population oldPop, Population selectedPop);
/** /**
* Perform adaption of the operator based on the developmental step performed by an EA. * Perform adaption of the operator based on the developmental step performed by an EA.
@ -32,5 +32,5 @@ public interface InterfaceAdaptOperatorGenerational {
* @param newPop the new population created by the EA, should already be evaluated * @param newPop the new population created by the EA, should already be evaluated
* @param updateSelected if true, the selected population should be adapted as well * @param updateSelected if true, the selected population should be adapted as well
*/ */
public void adaptGenerational(Population oldPop, Population selectedPop, Population newPop, boolean updateSelected); void adaptGenerational(Population oldPop, Population selectedPop, Population newPop, boolean updateSelected);
} }

View File

@ -15,7 +15,7 @@ public interface InterfaceMutation {
* *
* @return The clone * @return The clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows you to initialize the mutation operator * This method allows you to initialize the mutation operator
@ -23,7 +23,7 @@ public interface InterfaceMutation {
* @param individual The individual that will be mutated. * @param individual The individual that will be mutated.
* @param opt The optimization problem. * @param opt The optimization problem.
*/ */
public void initialize(AbstractEAIndividual individual, InterfaceOptimizationProblem opt); void initialize(AbstractEAIndividual individual, InterfaceOptimizationProblem opt);
/** /**
* This method will mutate a given AbstractEAIndividual. If the individual * This method will mutate a given AbstractEAIndividual. If the individual
@ -31,7 +31,7 @@ public interface InterfaceMutation {
* *
* @param individual The individual that is to be mutated * @param individual The individual that is to be mutated
*/ */
public void mutate(AbstractEAIndividual individual); void mutate(AbstractEAIndividual individual);
/** /**
* This method allows you to perform either crossover on the strategy parameters * This method allows you to perform either crossover on the strategy parameters
@ -40,7 +40,7 @@ public interface InterfaceMutation {
* @param indy1 The original mother * @param indy1 The original mother
* @param partners The original partners * @param partners The original partners
*/ */
public void crossoverOnStrategyParameters(AbstractEAIndividual indy1, Population partners); void crossoverOnStrategyParameters(AbstractEAIndividual indy1, Population partners);
/** /**
* This method allows you to get a string representation of the mutation * This method allows you to get a string representation of the mutation
@ -48,7 +48,7 @@ public interface InterfaceMutation {
* *
* @return A descriptive string. * @return A descriptive string.
*/ */
public String getStringRepresentation(); String getStringRepresentation();
/** /**
* This method allows you to evaluate wether two mutation operators * This method allows you to evaluate wether two mutation operators
@ -57,5 +57,5 @@ public interface InterfaceMutation {
* @param mutator The other mutation operator * @param mutator The other mutation operator
*/ */
@Override @Override
public boolean equals(Object mutator); boolean equals(Object mutator);
} }

View File

@ -16,7 +16,7 @@ public interface InterfaceAbsorptionStrategy {
* @return * @return
* @tested decides whether indy should be absorbed into the subswarm according to the absorption strategie * @tested decides whether indy should be absorbed into the subswarm according to the absorption strategie
*/ */
public abstract boolean shouldAbsorbParticleIntoSubswarm( boolean shouldAbsorbParticleIntoSubswarm(
AbstractEAIndividual indy, AbstractEAIndividual indy,
ParticleSubSwarmOptimization subswarm, ParticleSubSwarmOptimization subswarm,
ParticleSubSwarmOptimization mainswarm); ParticleSubSwarmOptimization mainswarm);
@ -27,10 +27,10 @@ public interface InterfaceAbsorptionStrategy {
* @param mainswarm the swarm indy currently belongs to * @param mainswarm the swarm indy currently belongs to
* @tested absorbs indy according to the absorbtion strategy * @tested absorbs indy according to the absorbtion strategy
*/ */
public abstract void absorbParticle( void absorbParticle(
AbstractEAIndividual indy, AbstractEAIndividual indy,
ParticleSubSwarmOptimization subswarm, ParticleSubSwarmOptimization subswarm,
ParticleSubSwarmOptimization mainswarm); ParticleSubSwarmOptimization mainswarm);
public abstract Object clone(); Object clone();
} }

View File

@ -32,10 +32,7 @@ public class StandardAbsorptionStrategy implements InterfaceAbsorptionStrategy,
if (!subswarm.isActive()) { if (!subswarm.isActive()) {
return false; // no interaction between active mainswarmparticle and inactive subswarm return false; // no interaction between active mainswarmparticle and inactive subswarm
} }
if (!particleLiesInSubswarmRadius(indy, subswarm)) { return particleLiesInSubswarmRadius(indy, subswarm);
return false;
}
return true;
} }
private boolean particleLiesInSubswarmRadius(AbstractEAIndividual indy, ParticleSubSwarmOptimization subswarm) { private boolean particleLiesInSubswarmRadius(AbstractEAIndividual indy, ParticleSubSwarmOptimization subswarm) {
@ -43,11 +40,7 @@ public class StandardAbsorptionStrategy implements InterfaceAbsorptionStrategy,
double R = subswarm.getBoundSwarmRadius(); // uses euclidean distance double R = subswarm.getBoundSwarmRadius(); // uses euclidean distance
AbstractEAIndividual gbest = subswarm.getGBestIndividual(); AbstractEAIndividual gbest = subswarm.getGBestIndividual();
double dist = subswarm.distance(indy, gbest); // euclidean distance double dist = subswarm.distance(indy, gbest); // euclidean distance
if (dist <= R) { return dist <= R;
return true;
} else {
return false;
}
} }

View File

@ -12,7 +12,7 @@ public interface InterfaceDeactivationStrategy {
* @return * @return
* @tested decides whether a subswarm should be deacitvated according to the deactivation strategy * @tested decides whether a subswarm should be deacitvated according to the deactivation strategy
*/ */
public abstract boolean shouldDeactivateSubswarm(ParticleSubSwarmOptimization subswarm); boolean shouldDeactivateSubswarm(ParticleSubSwarmOptimization subswarm);
/** /**
* @param subswarm * @param subswarm
@ -21,8 +21,8 @@ public interface InterfaceDeactivationStrategy {
* What happens to the particles in this subswarm depends on the concrete strategy. * What happens to the particles in this subswarm depends on the concrete strategy.
* Return the list of indices to be reinitialized or null. * Return the list of indices to be reinitialized or null.
*/ */
public abstract int[] deactivateSubswarm(ParticleSubSwarmOptimization subswarm, ParticleSubSwarmOptimization mainswarm); int[] deactivateSubswarm(ParticleSubSwarmOptimization subswarm, ParticleSubSwarmOptimization mainswarm);
public abstract Object clone(); Object clone();
} }

View File

@ -17,7 +17,7 @@ public interface InterfaceMergingStrategy {
* @param subswarm2 * @param subswarm2
* @return * @return
*/ */
public abstract boolean shouldMergeSubswarms( boolean shouldMergeSubswarms(
ParticleSubSwarmOptimization subswarm1, ParticleSubSwarmOptimization subswarm1,
ParticleSubSwarmOptimization subswarm2); ParticleSubSwarmOptimization subswarm2);
@ -32,11 +32,11 @@ public interface InterfaceMergingStrategy {
* @param subSwarms * @param subSwarms
* @param mainSwarm * @param mainSwarm
*/ */
public abstract void mergeSubswarms( void mergeSubswarms(
int i, int i,
int j, int j,
Vector<ParticleSubSwarmOptimization> subSwarms, Vector<ParticleSubSwarmOptimization> subSwarms,
ParticleSubSwarmOptimization mainSwarm); ParticleSubSwarmOptimization mainSwarm);
public abstract Object clone(); Object clone();
} }

View File

@ -54,12 +54,9 @@ public class StandardMergingStrategy implements InterfaceMergingStrategy, java.i
return false; return false;
} }
if (!subswarmsOverlapOrAreVeryClose(subswarm1, subswarm2)) { return subswarmsOverlapOrAreVeryClose(subswarm1, subswarm2);
return false;
}
return true;
} }
private boolean subswarmsOverlapOrAreVeryClose(ParticleSubSwarmOptimization subswarm1, ParticleSubSwarmOptimization subswarm2) { private boolean subswarmsOverlapOrAreVeryClose(ParticleSubSwarmOptimization subswarm1, ParticleSubSwarmOptimization subswarm2) {
@ -101,10 +98,7 @@ public class StandardMergingStrategy implements InterfaceMergingStrategy, java.i
} // normalised distance } // normalised distance
//if (Ri == 0 && Rj == 0 && dist_norm < getEpsilon()){ // see "Enhancing the NichePSO" paper //if (Ri == 0 && Rj == 0 && dist_norm < getEpsilon()){ // see "Enhancing the NichePSO" paper
if (dist_norm < getMu()) { // Ri und Rj auf null testen sinvoll ? return dist_norm < getMu();
return true;
}
return false;
} }
/********************************************************************************************************************** /**********************************************************************************************************************

View File

@ -14,7 +14,7 @@ public interface InterfaceSubswarmCreationStrategy {
* @return * @return
* @tested decides whether a subswarm should be created for the given indy and mainswarm according to the creation strategie * @tested decides whether a subswarm should be created for the given indy and mainswarm according to the creation strategie
*/ */
public abstract boolean shouldCreateSubswarm( boolean shouldCreateSubswarm(
AbstractEAIndividual indy, AbstractEAIndividual indy,
ParticleSubSwarmOptimization mainswarm); ParticleSubSwarmOptimization mainswarm);
@ -26,10 +26,10 @@ public interface InterfaceSubswarmCreationStrategy {
* @param mainSwarm the main swarm which contains indy * @param mainSwarm the main swarm which contains indy
* @tested creates a subswarm from indy, the details depend on the concrete strategy. * @tested creates a subswarm from indy, the details depend on the concrete strategy.
*/ */
public abstract void createSubswarm( void createSubswarm(
ParticleSubSwarmOptimization preparedSubswarm, ParticleSubSwarmOptimization preparedSubswarm,
AbstractEAIndividual indy, AbstractEAIndividual indy,
ParticleSubSwarmOptimization mainSwarm); ParticleSubSwarmOptimization mainSwarm);
public abstract Object clone(); Object clone();
} }

View File

@ -48,11 +48,8 @@ public class StandardSubswarmCreationStrategy implements InterfaceSubswarmCreati
// check for stddev < delta condition // check for stddev < delta condition
double stddev = (Double) indy.getData(NichePSO.stdDevKey); double stddev = (Double) indy.getData(NichePSO.stdDevKey);
if (stddev >= getDelta()) { return stddev < getDelta();
return false;
}
return true;
} }
/** /**

View File

@ -12,5 +12,5 @@ public interface GenericParamAdaption extends ParamAdaption {
* *
* @param prm * @param prm
*/ */
public void setControlledParam(String prm); void setControlledParam(String prm);
} }

View File

@ -7,7 +7,7 @@ package eva2.optimization.operator.paramcontrol;
* @author mkron * @author mkron
*/ */
public interface InterfaceHasUpperDoubleBound { public interface InterfaceHasUpperDoubleBound {
public double getUpperBnd(); double getUpperBnd();
public void SetUpperBnd(double u); void SetUpperBnd(double u);
} }

View File

@ -6,11 +6,11 @@ package eva2.optimization.operator.paramcontrol;
* @author mkron * @author mkron
*/ */
public interface InterfaceParamControllable { public interface InterfaceParamControllable {
public void notifyParamChanged(String member, Object oldVal, Object newVal); void notifyParamChanged(String member, Object oldVal, Object newVal);
public Object[] getParamControl(); Object[] getParamControl();
public void addChangeListener(ParamChangeListener l); void addChangeListener(ParamChangeListener l);
public void removeChangeListener(ParamChangeListener l); void removeChangeListener(ParamChangeListener l);
} }

View File

@ -24,21 +24,21 @@ public interface InterfaceParameterControl {
* *
* @return Deep copy * @return Deep copy
*/ */
public Object clone(); Object clone();
/** /**
* Initialize the parameter control instance before a run. * Initialize the parameter control instance before a run.
* *
* @param obj The controlled object. * @param obj The controlled object.
*/ */
public void init(Object obj, Population initialPop); void init(Object obj, Population initialPop);
/** /**
* After an optimization run, finalizing stuff may be done. * After an optimization run, finalizing stuff may be done.
* *
* @param obj The controlled object. * @param obj The controlled object.
*/ */
public void finish(Object obj, Population finalPop); void finish(Object obj, Population finalPop);
/** /**
* For a given runtime (maxIteration) and current iteration, update the parameters of the object. * For a given runtime (maxIteration) and current iteration, update the parameters of the object.
@ -48,7 +48,7 @@ public interface InterfaceParameterControl {
* @param iteration Iteration * @param iteration Iteration
* @param maxIteration Maximum Iteration * @param maxIteration Maximum Iteration
*/ */
public void updateParameters(Object obj, Population pop, int iteration, int maxIteration); void updateParameters(Object obj, Population pop, int iteration, int maxIteration);
/** /**
* If no runtime in terms of iterations can be specified, the parameter control may try to infer * If no runtime in terms of iterations can be specified, the parameter control may try to infer
@ -56,5 +56,5 @@ public interface InterfaceParameterControl {
* *
* @param obj Object * @param obj Object
*/ */
public void updateParameters(Object obj); void updateParameters(Object obj);
} }

View File

@ -9,9 +9,9 @@ import eva2.optimization.population.Population;
*/ */
public interface ParamAdaption { public interface ParamAdaption {
public Object clone(); Object clone();
public String getControlledParam(); String getControlledParam();
/** /**
* Perform the adaption. * Perform the adaption.
@ -20,10 +20,10 @@ public interface ParamAdaption {
* @param maxIteration * @param maxIteration
* @return * @return
*/ */
public Object calcValue(Object obj, Population pop, int iteration, int maxIteration); Object calcValue(Object obj, Population pop, int iteration, int maxIteration);
public void init(Object obj, Population pop, Object[] initialValues); void init(Object obj, Population pop, Object[] initialValues);
public void finish(Object obj, Population pop); void finish(Object obj, Population pop);
} }

View File

@ -1,5 +1,5 @@
package eva2.optimization.operator.paramcontrol; package eva2.optimization.operator.paramcontrol;
public interface ParamChangeListener { public interface ParamChangeListener {
public void notifyChange(InterfaceParamControllable controllable, Object oldVal, Object newVal, String msg); void notifyChange(InterfaceParamControllable controllable, Object oldVal, Object newVal, String msg);
} }

View File

@ -13,11 +13,11 @@ public interface InterfaceParetoFrontMetric {
* *
* @return the clone * @return the clone
*/ */
public Object clone(); Object clone();
/** /**
* This method gives a metirc how to evaluate * This method gives a metirc how to evaluate
* an achieved Pareto-Front * an achieved Pareto-Front
*/ */
public double calculateMetricOn(Population pop, AbstractMultiObjectiveOptimizationProblem problem); double calculateMetricOn(Population pop, AbstractMultiObjectiveOptimizationProblem problem);
} }

View File

@ -11,37 +11,37 @@ import eva2.optimization.enums.PostProcessMethod;
* @author mkron * @author mkron
*/ */
public interface InterfacePostProcessParams { public interface InterfacePostProcessParams {
public int getPostProcessSteps(); int getPostProcessSteps();
public void setPostProcessSteps(int ppSteps); void setPostProcessSteps(int ppSteps);
public String postProcessStepsTipText(); String postProcessStepsTipText();
public boolean isDoPostProcessing(); boolean isDoPostProcessing();
public void setDoPostProcessing(boolean postProcess); void setDoPostProcessing(boolean postProcess);
public String doPostProcessingTipText(); String doPostProcessingTipText();
public double getPostProcessClusterSigma(); double getPostProcessClusterSigma();
public void setPostProcessClusterSigma(double postProcessClusterSigma); void setPostProcessClusterSigma(double postProcessClusterSigma);
public String postProcessClusterSigmaTipText(); String postProcessClusterSigmaTipText();
public int getPrintNBest(); int getPrintNBest();
public void setPrintNBest(int nBest); void setPrintNBest(int nBest);
public String printNBestTipText(); String printNBestTipText();
public void setPPMethod(PostProcessMethod meth); void setPPMethod(PostProcessMethod meth);
public PostProcessMethod getPPMethod(); PostProcessMethod getPPMethod();
public String PPMethodTipText(); String PPMethodTipText();
public boolean isWithPlot(); boolean isWithPlot();
public void setWithPlot(boolean withPlot); void setWithPlot(boolean withPlot);
} }

View File

@ -21,7 +21,7 @@ public interface InterfaceSelection {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method allows an selection method to do some preliminary * This method allows an selection method to do some preliminary
@ -31,7 +31,7 @@ public interface InterfaceSelection {
* *
* @param population The population that is to be processed. * @param population The population that is to be processed.
*/ */
public void prepareSelection(Population population); void prepareSelection(Population population);
/** /**
* This method will select >size< individuals from the given * This method will select >size< individuals from the given
@ -41,7 +41,7 @@ public interface InterfaceSelection {
* @param size The number of Individuals to select * @param size The number of Individuals to select
* @return The selected population. * @return The selected population.
*/ */
public Population selectFrom(Population population, int size); Population selectFrom(Population population, int size);
/** /**
* This method allows you to select >size< partners for a given Individual * This method allows you to select >size< partners for a given Individual
@ -51,7 +51,7 @@ public interface InterfaceSelection {
* @param size The number of partners needed. * @param size The number of partners needed.
* @return The selected partners. * @return The selected partners.
*/ */
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size); Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size);
/** /**
* Toggle the use of obeying the constraint violation principle * Toggle the use of obeying the constraint violation principle
@ -59,5 +59,5 @@ public interface InterfaceSelection {
* *
* @param b The new state * @param b The new state
*/ */
public void setObeyDebsConstViolationPrinciple(boolean b); void setObeyDebsConstViolationPrinciple(boolean b);
} }

View File

@ -16,7 +16,7 @@ public interface InterfaceSelectionProbability {
* *
* @return the deep clone * @return the deep clone
*/ */
public Object clone(); Object clone();
/** /**
* This method computes the selection probability for each individual * This method computes the selection probability for each individual
@ -26,7 +26,7 @@ public interface InterfaceSelectionProbability {
* @param population The population to compute. * @param population The population to compute.
* @param input The name of the input. * @param input The name of the input.
*/ */
public void computeSelectionProbability(Population population, String[] input, boolean obeyConst); void computeSelectionProbability(Population population, String[] input, boolean obeyConst);
/** /**
* This method computes the selection probability for each individual * This method computes the selection probability for each individual
@ -36,7 +36,7 @@ public interface InterfaceSelectionProbability {
* @param population The population to compute. * @param population The population to compute.
* @param input The name of the input. * @param input The name of the input.
*/ */
public void computeSelectionProbability(Population population, String input, boolean obeyConst); void computeSelectionProbability(Population population, String input, boolean obeyConst);
/** /**
* This method computes the selection probability for each individual * This method computes the selection probability for each individual
@ -46,5 +46,5 @@ public interface InterfaceSelectionProbability {
* @param population The population to compute. * @param population The population to compute.
* @param data The input data as double[][]. * @param data The input data as double[][].
*/ */
public void computeSelectionProbability(Population population, double[][] data, boolean obeyConst); void computeSelectionProbability(Population population, double[][] data, boolean obeyConst);
} }

View File

@ -11,7 +11,7 @@ public interface InterfaceReplacement {
/** /**
* The ever present clone method * The ever present clone method
*/ */
public Object clone(); Object clone();
/** /**
* This method will insert the given individual into the population * This method will insert the given individual into the population
@ -22,5 +22,5 @@ public interface InterfaceReplacement {
* @param pop The population * @param pop The population
* @param sub The subset * @param sub The subset
*/ */
public void insertIndividual(AbstractEAIndividual indy, Population pop, Population sub); void insertIndividual(AbstractEAIndividual indy, Population pop, Population sub);
} }

View File

@ -14,14 +14,14 @@ public interface InterfaceTerminator {
* @param pop the population to test * @param pop the population to test
* @return true if the population fulfills the termination criterion, else false * @return true if the population fulfills the termination criterion, else false
*/ */
public boolean isTerminated(PopulationInterface pop); boolean isTerminated(PopulationInterface pop);
public boolean isTerminated(InterfaceSolutionSet pop); boolean isTerminated(InterfaceSolutionSet pop);
@Override @Override
public String toString(); String toString();
public String lastTerminationMessage(); String lastTerminationMessage();
public void initialize(InterfaceOptimizationProblem prob); void initialize(InterfaceOptimizationProblem prob);
} }

View File

@ -9,9 +9,9 @@ package eva2.optimization.population;
* @author mkron * @author mkron
*/ */
public interface InterfaceSolutionSet { public interface InterfaceSolutionSet {
public Population getSolutions(); Population getSolutions();
public Population getCurrentPopulation(); Population getCurrentPopulation();
public SolutionSet clone(); SolutionSet clone();
} }

View File

@ -18,7 +18,7 @@ public interface InterfaceStatisticsListener {
* @param statObjects * @param statObjects
* @param statDoubles * @param statDoubles
*/ */
public void notifyGenerationPerformed(String[] header, Object[] statObjects, Double[] statDoubles); void notifyGenerationPerformed(String[] header, Object[] statObjects, Double[] statDoubles);
/** /**
* Method called at the start of a single run. * Method called at the start of a single run.
@ -28,7 +28,7 @@ public interface InterfaceStatisticsListener {
* @param header field names of the data * @param header field names of the data
* @param metaInfo additional meta information on the data fields * @param metaInfo additional meta information on the data fields
*/ */
public void notifyRunStarted(int runNumber, int plannedMultiRuns, String[] header, String[] metaInfo); void notifyRunStarted(int runNumber, int plannedMultiRuns, String[] header, String[] metaInfo);
/** /**
* Method called at the end of a single run. * Method called at the end of a single run.
@ -36,7 +36,7 @@ public interface InterfaceStatisticsListener {
* @param runsPerformed the number of runs performed * @param runsPerformed the number of runs performed
* @param completedLastRun true, if the last run was stopped normally, otherwise false, e.g. indicating a user break * @param completedLastRun true, if the last run was stopped normally, otherwise false, e.g. indicating a user break
*/ */
public void notifyRunStopped(int runsPerformed, boolean completedLastRun); void notifyRunStopped(int runsPerformed, boolean completedLastRun);
/** /**
* Receive the list of last data lines for a set of multiruns. The data list may be null if no runs were * Receive the list of last data lines for a set of multiruns. The data list may be null if no runs were
@ -47,7 +47,7 @@ public interface InterfaceStatisticsListener {
* @see InterfaceStatisticsParameters * @see InterfaceStatisticsParameters
* @see AbstractStatistics * @see AbstractStatistics
*/ */
public void finalMultiRunResults(String[] header, List<Object[]> multiRunFinalObjectData); void finalMultiRunResults(String[] header, List<Object[]> multiRunFinalObjectData);
/** /**
* Called after the job is finished. Return true if the listener should be removed after this multi-run. * Called after the job is finished. Return true if the listener should be removed after this multi-run.
@ -55,5 +55,5 @@ public interface InterfaceStatisticsListener {
* @param header * @param header
* @param multiRunFinalObjectData * @param multiRunFinalObjectData
*/ */
public boolean notifyMultiRunFinished(String[] header, List<Object[]> multiRunFinalObjectData); boolean notifyMultiRunFinished(String[] header, List<Object[]> multiRunFinalObjectData);
} }

View File

@ -62,7 +62,7 @@ public interface InterfaceStatisticsParameters {
OutputTo getOutputTo(); OutputTo getOutputTo();
public enum OutputVerbosity { enum OutputVerbosity {
NONE, FINAL, KTH_IT, ALL; NONE, FINAL, KTH_IT, ALL;
@Override @Override
@ -77,7 +77,7 @@ public interface InterfaceStatisticsParameters {
} }
} }
public enum OutputTo { enum OutputTo {
FILE, WINDOW, BOTH; FILE, WINDOW, BOTH;
public String toString() { public String toString() {

View File

@ -6,7 +6,7 @@ package eva2.optimization.statistics;
* @author mkron * @author mkron
*/ */
public interface InterfaceTextListener { public interface InterfaceTextListener {
public void print(String str); void print(String str);
public void println(String str); void println(String str);
} }

View File

@ -10,9 +10,9 @@ import eva2.optimization.population.Population;
*/ */
public interface InterfaceSpeciesAware { public interface InterfaceSpeciesAware {
// these can be used to tag a population as explorer or local search population. // these can be used to tag a population as explorer or local search population.
public final static String populationTagKey = "specAwarePopulationTag"; String populationTagKey = "specAwarePopulationTag";
public final static Integer explorerPopTag = 23; Integer explorerPopTag = 23;
public final static Integer localPopTag = 42; Integer localPopTag = 42;
/** /**
* Two species have been merged to the first one. * Two species have been merged to the first one.
@ -20,7 +20,7 @@ public interface InterfaceSpeciesAware {
* @param p1 * @param p1
* @param p2 * @param p2
*/ */
public void mergeToFirstPopulationEvent(Population p1, Population p2); void mergeToFirstPopulationEvent(Population p1, Population p2);
/** /**
* Notify that a split has occurred separating p2 from p1. * Notify that a split has occurred separating p2 from p1.
@ -28,5 +28,5 @@ public interface InterfaceSpeciesAware {
* @param p1 * @param p1
* @param p2 * @param p2
*/ */
public void splitFromFirst(Population p1, Population p2); void splitFromFirst(Population p1, Population p2);
} }

View File

@ -253,11 +253,7 @@ public class F8Problem extends AbstractProblemDoubleOffset
} else { // the number of optima is corret - now check different offset or rotation by comparing one fitness value } else { // the number of optima is corret - now check different offset or rotation by comparing one fitness value
AbstractEAIndividual indy = listOfOptima.getEAIndividual(1); AbstractEAIndividual indy = listOfOptima.getEAIndividual(1);
double[] curFit = evaluate(indy.getDoublePosition()); double[] curFit = evaluate(indy.getDoublePosition());
if (Math.abs(Mathematics.dist(curFit, indy.getFitness(), 2)) > 1e-10) { return Math.abs(Mathematics.dist(curFit, indy.getFitness(), 2)) > 1e-10;
return true;
} else {
return false;
}
} }
} }

View File

@ -12,7 +12,7 @@ public interface Interface2DBorderProblem {
* *
* @return double[][] * @return double[][]
*/ */
public double[][] get2DBorder(); double[][] get2DBorder();
/** /**
* This method returns the double value at a given position. The value should be * This method returns the double value at a given position. The value should be
@ -21,7 +21,7 @@ public interface Interface2DBorderProblem {
* @param point The double[2] that is queried. * @param point The double[2] that is queried.
* @return double * @return double
*/ */
public double functionValue(double[] point); double functionValue(double[] point);
/** /**
* Project a 2D point to the default higher-dimensional cut to be displayed (if required for plotting). * Project a 2D point to the default higher-dimensional cut to be displayed (if required for plotting).
@ -29,5 +29,5 @@ public interface Interface2DBorderProblem {
* @param point the double[2] that is queried * @param point the double[2] that is queried
* @return a (higher dimensional) projection of the point * @return a (higher dimensional) projection of the point
*/ */
public double[] project2DPoint(double[] point); double[] project2DPoint(double[] point);
} }

View File

@ -14,14 +14,14 @@ public interface InterfaceAdditionalPopulationInformer {
* *
* @return String * @return String
*/ */
public String[] getAdditionalDataHeader(); String[] getAdditionalDataHeader();
/** /**
* Optionally return informative descriptions of the data fields. * Optionally return informative descriptions of the data fields.
* *
* @return * @return
*/ */
public String[] getAdditionalDataInfo(); String[] getAdditionalDataInfo();
/** /**
* This method returns additional statistical data. * This method returns additional statistical data.
@ -29,5 +29,5 @@ public interface InterfaceAdditionalPopulationInformer {
* @param pop The population that is to be refined. * @param pop The population that is to be refined.
* @return String * @return String
*/ */
public Object[] getAdditionalDataValue(PopulationInterface pop); Object[] getAdditionalDataValue(PopulationInterface pop);
} }

View File

@ -15,7 +15,7 @@ public interface InterfaceFirstOrderDerivableProblem {
* @param x * @param x
* @return the first order gradients of this problem * @return the first order gradients of this problem
*/ */
public double[] getFirstOrderGradients(double[] x); double[] getFirstOrderGradients(double[] x);
// public double getFirstOrderGradient(int paramindex,double[] x); // public double getFirstOrderGradient(int paramindex,double[] x);
} }

View File

@ -16,5 +16,5 @@ public interface InterfaceHasInitRange {
* *
* @return An initial search range or null in case it is equal to the global search range. * @return An initial search range or null in case it is equal to the global search range.
*/ */
public Object getInitializationRange(); Object getInitializationRange();
} }

View File

@ -6,5 +6,5 @@ package eva2.problems;
* @author mkron * @author mkron
*/ */
public interface InterfaceHasSolutionViewer { public interface InterfaceHasSolutionViewer {
public InterfaceSolutionViewer getSolutionViewer(); InterfaceSolutionViewer getSolutionViewer();
} }

View File

@ -13,5 +13,5 @@ public interface InterfaceInterestingHistogram {
* *
* @return * @return
*/ */
public SolutionHistogram getHistogram(); SolutionHistogram getHistogram();
} }

View File

@ -12,12 +12,12 @@ public interface InterfaceLocalSearchable extends InterfaceOptimizationProblem {
* *
* @param pop * @param pop
*/ */
public void doLocalSearch(Population pop); void doLocalSearch(Population pop);
/** /**
* Estimate the cost of one local search step -- more precisely the cost of the doLocalSearch call per one individual. * Estimate the cost of one local search step -- more precisely the cost of the doLocalSearch call per one individual.
* *
* @return * @return
*/ */
public double getLocalSearchStepFunctionCallEquivalent(); double getLocalSearchStepFunctionCallEquivalent();
} }

View File

@ -15,7 +15,7 @@ public interface InterfaceMultiObjectiveDeNovoProblem {
* *
* @return A list of optimization objectives * @return A list of optimization objectives
*/ */
public InterfaceOptimizationObjective[] getProblemObjectives(); InterfaceOptimizationObjective[] getProblemObjectives();
/** /**
* This method will generate a problem specific view on the Pareto * This method will generate a problem specific view on the Pareto
@ -24,12 +24,12 @@ public interface InterfaceMultiObjectiveDeNovoProblem {
* *
* @return the Panel * @return the Panel
*/ */
public InterfaceParetoFrontView getParetoFrontViewer4MOCCO(MOCCOViewer t); InterfaceParetoFrontView getParetoFrontViewer4MOCCO(MOCCOViewer t);
/** /**
* This method allows MOCCO to deactivate the representation editior * This method allows MOCCO to deactivate the representation editior
* if and only if the specific editor reacts to this signal. This signal * if and only if the specific editor reacts to this signal. This signal
* cannot be deactivated! * cannot be deactivated!
*/ */
public void deactivateRepresentationEdit(); void deactivateRepresentationEdit();
} }

View File

@ -17,14 +17,14 @@ public interface InterfaceMultimodalProblemKnown extends InterfaceMultimodalProb
* if possible and to return quality measures like NumberOfOptimaFound and * if possible and to return quality measures like NumberOfOptimaFound and
* the MaximumPeakRatio. This method should be called by the user. * the MaximumPeakRatio. This method should be called by the user.
*/ */
public void initListOfOptima(); void initListOfOptima();
/** /**
* Return true if the full list of optima is available, else false. * Return true if the full list of optima is available, else false.
* *
* @return * @return
*/ */
public boolean fullListAvailable(); boolean fullListAvailable();
/** /**
* This method returns a list of all optima as population or null if * This method returns a list of all optima as population or null if
@ -32,7 +32,7 @@ public interface InterfaceMultimodalProblemKnown extends InterfaceMultimodalProb
* *
* @return population * @return population
*/ */
public Population getRealOptima(); Population getRealOptima();
/** /**
* Return the number of identified optima or -1 if * Return the number of identified optima or -1 if
@ -41,7 +41,7 @@ public interface InterfaceMultimodalProblemKnown extends InterfaceMultimodalProb
* @param pop A population of possible solutions. * @param pop A population of possible solutions.
* @return int * @return int
*/ */
public int getNumberOfFoundOptima(Population pop); int getNumberOfFoundOptima(Population pop);
/** /**
* This method returns the Maximum Peak Ratio. * This method returns the Maximum Peak Ratio.
@ -49,7 +49,7 @@ public interface InterfaceMultimodalProblemKnown extends InterfaceMultimodalProb
* @param pop A population of possible solutions. * @param pop A population of possible solutions.
* @return double * @return double
*/ */
public double getMaximumPeakRatio(Population pop); double getMaximumPeakRatio(Population pop);
/** /**
* Return the maximum normed distance to a known optimum for which the * Return the maximum normed distance to a known optimum for which the
@ -57,5 +57,5 @@ public interface InterfaceMultimodalProblemKnown extends InterfaceMultimodalProb
* *
* @return * @return
*/ */
public double getDefaultAccuracy(); double getDefaultAccuracy();
} }

View File

@ -4,21 +4,21 @@ package eva2.problems;
* *
*/ */
public interface InterfaceOptimizationObjective { public interface InterfaceOptimizationObjective {
public Object clone(); Object clone();
/** /**
* This Method returns the name for the optimization target * This Method returns the name for the optimization target
* *
* @return the name * @return the name
*/ */
public String getName(); String getName();
/** /**
* This method allows you to retrieve the name of the optimization target * This method allows you to retrieve the name of the optimization target
* *
* @return The name * @return The name
*/ */
public String getIdentName(); String getIdentName();
/** /**
* This method allows you to retrieve the current optimization mode * This method allows you to retrieve the current optimization mode
@ -30,28 +30,28 @@ public interface InterfaceOptimizationObjective {
* *
* @return The mode as string * @return The mode as string
*/ */
public String getOptimizationMode(); String getOptimizationMode();
public void SetOptimizationMode(String d); void SetOptimizationMode(String d);
/** /**
* This method allows you to retrieve the constraint/goal * This method allows you to retrieve the constraint/goal
* *
* @return The cosntraint/goal * @return The cosntraint/goal
*/ */
public double getConstraintGoal(); double getConstraintGoal();
/** /**
* This method allows you to set the constraint/goal * This method allows you to set the constraint/goal
* *
* @param d the constraint/goal * @param d the constraint/goal
*/ */
public void SetConstraintGoal(double d); void SetConstraintGoal(double d);
/** /**
* This method returns whether or not the given objective is to be minimized * This method returns whether or not the given objective is to be minimized
* *
* @return True if to be minimized false else. * @return True if to be minimized false else.
*/ */
public boolean is2BMinimized(); boolean is2BMinimized();
} }

View File

@ -16,12 +16,12 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* *
* @return the clone * @return the clone
*/ */
public Object clone(); Object clone();
/** /**
* This method initializes the Problem to log multiruns * This method initializes the Problem to log multiruns
*/ */
public void initializeProblem(); void initializeProblem();
/** /**
* This method will report whether or not this optimization problem is truly * This method will report whether or not this optimization problem is truly
@ -29,14 +29,14 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* *
* @return True if multi-objective, else false. * @return True if multi-objective, else false.
*/ */
public boolean isMultiObjective(); boolean isMultiObjective();
/** /**
* This method initialized a given population * This method initialized a given population
* *
* @param population The populations that is to be initialized. * @param population The populations that is to be initialized.
*/ */
public void initializePopulation(Population population); void initializePopulation(Population population);
/** /**
* This method evaluates a given population and sets the fitness values * This method evaluates a given population and sets the fitness values
@ -44,14 +44,14 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* *
* @param population The population that is to be evaluated. * @param population The population that is to be evaluated.
*/ */
public void evaluate(Population population); void evaluate(Population population);
/** /**
* This method evaluate a single individual and sets the fitness values * This method evaluate a single individual and sets the fitness values
* *
* @param individual The individual that is to be evalutated * @param individual The individual that is to be evalutated
*/ */
public void evaluate(AbstractEAIndividual individual); void evaluate(AbstractEAIndividual individual);
/** /**
* This method allows the GenericObjectEditorPanel to read the * This method allows the GenericObjectEditorPanel to read the
@ -59,7 +59,7 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* *
* @return The name. * @return The name.
*/ */
public String getName(); String getName();
/** /**
* This method allows you to output a string that describes a found solution * This method allows you to output a string that describes a found solution
@ -68,7 +68,7 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* @param individual The individual that is to be shown. * @param individual The individual that is to be shown.
* @return The description. * @return The description.
*/ */
public String getSolutionRepresentationFor(AbstractEAIndividual individual); String getSolutionRepresentationFor(AbstractEAIndividual individual);
/** /**
* This method returns a string describing the optimization problem. * This method returns a string describing the optimization problem.
@ -76,13 +76,13 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* @param opt The Optimizer that is used or had been used. * @param opt The Optimizer that is used or had been used.
* @return The description. * @return The description.
*/ */
public String getStringRepresentationForProblem(InterfaceOptimizer opt); String getStringRepresentationForProblem(InterfaceOptimizer opt);
/** /**
* This method allows you to request a graphical representation for a given * This method allows you to request a graphical representation for a given
* individual. * individual.
*/ */
public JComponent drawIndividual(int generation, int funCalls, AbstractEAIndividual indy); JComponent drawIndividual(int generation, int funCalls, AbstractEAIndividual indy);
/** /**
* This method returns a double value that will be displayed in a fitness * This method returns a double value that will be displayed in a fitness
@ -92,12 +92,12 @@ public interface InterfaceOptimizationProblem extends InterfaceAdditionalPopulat
* @param pop The population that is to be refined. * @param pop The population that is to be refined.
* @return Double value * @return Double value
*/ */
public Double getDoublePlotValue(Population pop); Double getDoublePlotValue(Population pop);
/** /**
* This method returns the dimension of the problem. Some problem implementations * This method returns the dimension of the problem. Some problem implementations
* may add a setProblemDimension() method, but as some problems have a fixed problem * may add a setProblemDimension() method, but as some problems have a fixed problem
* dimension this is not added in this interface. * dimension this is not added in this interface.
*/ */
public int getProblemDimension(); int getProblemDimension();
} }

View File

@ -5,12 +5,12 @@ package eva2.problems;
*/ */
public interface InterfaceOptimizationTarget { public interface InterfaceOptimizationTarget {
public Object clone(); Object clone();
/** /**
* This method allows you to retrieve the name of the optimization target * This method allows you to retrieve the name of the optimization target
* *
* @return The name * @return The name
*/ */
public String getName(); String getName();
} }

View File

@ -13,21 +13,21 @@ public interface InterfaceProblemDouble {
* @param x the vector to evaluate * @param x the vector to evaluate
* @return the target function value * @return the target function value
*/ */
public double[] evaluate(double[] x); double[] evaluate(double[] x);
/** /**
* Create a new range array by using the getRangeLowerBound and getRangeUpperBound methods. * Create a new range array by using the getRangeLowerBound and getRangeUpperBound methods.
* *
* @return a range array * @return a range array
*/ */
public double[][] makeRange(); double[][] makeRange();
/** /**
* Get the EA individual template currently used by the problem. * Get the EA individual template currently used by the problem.
* *
* @return the EA individual template currently used * @return the EA individual template currently used
*/ */
public InterfaceDataTypeDouble getEAIndividual(); InterfaceDataTypeDouble getEAIndividual();
/** /**
* Get the upper bound of the double range in the given dimension. Override * Get the upper bound of the double range in the given dimension. Override
@ -38,7 +38,7 @@ public interface InterfaceProblemDouble {
* @see #makeRange() * @see #makeRange()
* @see #getRangeLowerBound(int dim) * @see #getRangeLowerBound(int dim)
*/ */
public double getRangeUpperBound(int dim); double getRangeUpperBound(int dim);
/** /**
* Get the lower bound of the double range in the given dimension. Override * Get the lower bound of the double range in the given dimension. Override
@ -49,5 +49,5 @@ public interface InterfaceProblemDouble {
* @see #makeRange() * @see #makeRange()
* @see #getRangeUpperBound(int dim) * @see #getRangeUpperBound(int dim)
*/ */
public double getRangeLowerBound(int dim); double getRangeLowerBound(int dim);
} }

View File

@ -14,7 +14,7 @@ public interface InterfaceProgramProblem extends InterfaceOptimizationProblem {
* @param sensor The identifier for the sensor. * @param sensor The identifier for the sensor.
* @return Sensor value * @return Sensor value
*/ */
public Object getSensorValue(String sensor); Object getSensorValue(String sensor);
/** /**
* This method allows a GP program to act in the environment * This method allows a GP program to act in the environment
@ -22,12 +22,12 @@ public interface InterfaceProgramProblem extends InterfaceOptimizationProblem {
* @param actuator The identifier for the actuator. * @param actuator The identifier for the actuator.
* @param parameter The actuator parameter. * @param parameter The actuator parameter.
*/ */
public void setActuatorValue(String actuator, Object parameter); void setActuatorValue(String actuator, Object parameter);
/** /**
* Return the GPArea associated with the program problem. * Return the GPArea associated with the program problem.
* *
* @return * @return
*/ */
public GPArea getArea(); GPArea getArea();
} }

View File

@ -13,17 +13,17 @@ public interface InterfaceSolutionViewer {
* *
* @param prob * @param prob
*/ */
public void initView(AbstractOptimizationProblem prob); void initView(AbstractOptimizationProblem prob);
/** /**
* Reset the view. * Reset the view.
*/ */
public void resetView(); void resetView();
/** /**
* Update the view by displaying a population of solutions (often only the best one is shown). * Update the view by displaying a population of solutions (often only the best one is shown).
* *
* @param pop * @param pop
*/ */
public void updateView(Population pop, boolean showAllIfPossible); void updateView(Population pop, boolean showAllIfPossible);
} }

View File

@ -9,7 +9,7 @@ public interface InterfaceRegressionFunction {
* *
* @return The clone. * @return The clone.
*/ */
public Object clone(); Object clone();
/** /**
* This method will return the y value for a given x vector * This method will return the y value for a given x vector
@ -17,5 +17,5 @@ public interface InterfaceRegressionFunction {
* @param x Input vector. * @param x Input vector.
* @return y the function result. * @return y the function result.
*/ */
public double evaluateFunction(double[] x); double evaluateFunction(double[] x);
} }

Some files were not shown because too many files have changed in this diff Show More