Renaming methods and removing toggel typo
This commit is contained in:
parent
34f3640efd
commit
91a0642e5d
@ -411,7 +411,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
||||
if (Thread.interrupted())
|
||||
throw new InterruptedException();
|
||||
// write header to file
|
||||
this.writeToFile(" FitnessCalls\t Best\t Mean\t Worst \t" + BeanInspector.toString(this.m_GO.getProblem().getAdditionalFileStringHeader(), '\t', false));
|
||||
this.writeToFile(" FitnessCalls\t Best\t Mean\t Worst \t" + BeanInspector.toString(this.m_GO.getProblem().getAdditionalDataHeader(), '\t', false));
|
||||
if ((this.m_ContinueFlag) && (this.m_Backup != null)) {
|
||||
this.m_RecentFC += this.m_Backup.getFunctionCalls();
|
||||
this.m_GO.getOptimizer().getProblem().initProblem();
|
||||
@ -582,7 +582,7 @@ public class GOStandaloneVersion implements InterfaceGOStandalone, InterfacePopu
|
||||
tmpLine.append("\t");
|
||||
tmpLine.append(population.getWorstEAIndividual().getFitness(0));
|
||||
//tmpLine.append("\t");
|
||||
//tmpLine.append(this.m_GO.getProblem().getAdditionalFileStringValue(population));
|
||||
//tmpLine.append(this.m_GO.getProblem().getAdditionalDataValue(population));
|
||||
this.writeToFile(tmpLine.toString());
|
||||
|
||||
Double[] tmpData = new Double[2];
|
||||
|
@ -274,17 +274,17 @@ public class ESIndividualBinaryData extends AbstractEAIndividual implements Inte
|
||||
return "This is an ES individual adopted to optimize binary values.";
|
||||
}
|
||||
|
||||
/** This method will toggle between genotyp interpreation as bit probability and
|
||||
/** This method will toggle between genotype interpretation as bit probability and
|
||||
* fixed switch.
|
||||
* @param b the Switch.
|
||||
*/
|
||||
public void setToggelInterpretation(boolean b) {
|
||||
public void setToggleInterpretation(boolean b) {
|
||||
this.m_UseHardSwitch = b;
|
||||
}
|
||||
public boolean getToggelInterpretation() {
|
||||
public boolean getToggleInterpretation() {
|
||||
return this.m_UseHardSwitch;
|
||||
}
|
||||
public String toggelInterpretationTipText() {
|
||||
return "Toggel between interpretation as probability or if(>0.5).";
|
||||
public String toggleInterpretationTipText() {
|
||||
return "Toggle between interpretation as probability or if(>0.5).";
|
||||
}
|
||||
}
|
||||
|
@ -405,14 +405,14 @@ public class MOCCOViewer extends JPanel implements InterfaceRefSolutionListener,
|
||||
if (this.m_RefSolutionListener != null) this.m_RefSolutionListener.individualSelected(indy);
|
||||
}
|
||||
|
||||
/** This method allows to toggel unique selection mode
|
||||
/** This method allows to toggle unique selection mode
|
||||
* @param t
|
||||
*/
|
||||
public void setUniquelySelectable(boolean t) {
|
||||
this.m_SelectUniqueSolution = t;
|
||||
}
|
||||
|
||||
/** This method allows to toggel selection mode
|
||||
/** This method allows to toggle selection mode
|
||||
* @param t
|
||||
*/
|
||||
public void setRefSolutionSelectable(boolean t) {
|
||||
@ -454,7 +454,7 @@ public class MOCCOViewer extends JPanel implements InterfaceRefSolutionListener,
|
||||
this.m_View.updateView();
|
||||
}
|
||||
|
||||
/** This method allows to toggel unique selection mode
|
||||
/** This method allows to toggle unique selection mode
|
||||
* @param t
|
||||
*/
|
||||
public void setRefPointSelectable(boolean t) {
|
||||
|
@ -163,7 +163,7 @@ public abstract class AbstractArchiving implements InterfaceArchiving, java.io.S
|
||||
// return "Toggles the debug mode.";
|
||||
// }
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -109,7 +109,7 @@ public class ArchivingMaxiMin implements InterfaceArchiving, java.io.Serializabl
|
||||
return "Choose the selection method (single-criteria ones please).";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -368,7 +368,7 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
|
||||
this.m_UseSearchSpace = m;
|
||||
}
|
||||
public String useSearchSpaceTipText() {
|
||||
return "Toggel between search/objective space distance.";
|
||||
return "Toggle between search/objective space distance.";
|
||||
}
|
||||
|
||||
/** This method allows you to toggle reuse of c.
|
||||
@ -381,7 +381,7 @@ public class ClusteringKMeans implements InterfaceClustering, java.io.Serializab
|
||||
this.m_ReuseC = m;
|
||||
}
|
||||
public String reuseCTipText() {
|
||||
return "Toggel reuse of previously found cluster centroids.";
|
||||
return "Toggle reuse of previously found cluster centroids.";
|
||||
}
|
||||
|
||||
public String initClustering(Population pop) {
|
||||
|
@ -377,7 +377,7 @@ public class ClusteringXMeans implements InterfaceClustering, java.io.Serializab
|
||||
this.m_UseSearchSpace = m;
|
||||
}
|
||||
public String useSearchSpaceTipText() {
|
||||
return "Toggel between search/objective space distance.";
|
||||
return "Toggle between search/objective space distance.";
|
||||
}
|
||||
|
||||
public String initClustering(Population pop) {
|
||||
|
@ -398,6 +398,6 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
|
||||
this.m_KMeans.setReuseC(this.m_ReuseC);
|
||||
}
|
||||
public String reuseCTipText() {
|
||||
return "Toggel reuse of previously found cluster centroids.";
|
||||
return "Toggle reuse of previously found cluster centroids.";
|
||||
}
|
||||
}
|
@ -49,7 +49,7 @@ public interface InterfaceSelection {
|
||||
*/
|
||||
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size);
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -99,7 +99,7 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
|
||||
return "This method selects all individuals.";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -172,7 +172,7 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
|
||||
return "Elitist Selection";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -133,7 +133,7 @@ public class SelectBestSingle implements InterfaceSelection, java.io.Serializabl
|
||||
return "Totalitarian Selection";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -196,7 +196,7 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
|
||||
m_Tournaments = g;
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -137,7 +137,7 @@ public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io
|
||||
return "Choose the selection method (single-criteria ones please).";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@ public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable
|
||||
return "Choose the selection method (single-criteria ones please).";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -167,7 +167,7 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
|
||||
m_TournamentSize = g;
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -133,7 +133,7 @@ public class SelectMONonDominated implements InterfaceSelection, java.io.Seriali
|
||||
return "Non-Dominated Selection";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -118,7 +118,7 @@ public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
|
||||
m_TournamentSize = g;
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -143,7 +143,7 @@ public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable
|
||||
return "PESAII Selection";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -149,7 +149,7 @@ public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable
|
||||
return "Choose a method for selecting the reduced population.";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -157,7 +157,7 @@ public class SelectParticleWheel implements InterfaceSelection, java.io.Serializ
|
||||
"This is a single objective selecting method, it will select in respect to a random criterion.";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -113,7 +113,7 @@ public class SelectRandom implements InterfaceSelection, java.io.Serializable {
|
||||
return "This method selects randomly. Therefore, it even works fine on Multiobjective fitness cases.";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -132,7 +132,7 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
|
||||
m_TournamentSize = g;
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -215,7 +215,7 @@ public class SelectXProbRouletteWheel implements InterfaceSelection, java.io.Ser
|
||||
return "Select the normation method.";
|
||||
}
|
||||
|
||||
/** Toggel the use of obeying the constraint violation principle
|
||||
/** Toggle the use of obeying the constraint violation principle
|
||||
* of Deb
|
||||
* @param b The new state
|
||||
*/
|
||||
|
@ -122,17 +122,17 @@ public abstract class AbstractMultiModalProblemKnown extends AbstractProblemDoub
|
||||
public abstract double[] evalUnnormalized(double[] x);
|
||||
|
||||
@Override
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
return ToolBox.appendArrays(new String[]{"numOptsFound", "maxPeakRatio"}, super.getAdditionalFileStringHeader());
|
||||
public String[] getAdditionalDataHeader() {
|
||||
return ToolBox.appendArrays(new String[]{"numOptsFound", "maxPeakRatio"}, super.getAdditionalDataHeader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object[] result = new Object[2];
|
||||
// result += AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual()) +"\t";
|
||||
result[0] = this.getNumberOfFoundOptima((Population)pop);
|
||||
result[1] = this.getMaximumPeakRatio((Population)pop);
|
||||
return ToolBox.appendArrays(result, super.getAdditionalFileStringValue(pop));
|
||||
return ToolBox.appendArrays(result, super.getAdditionalDataValue(pop));
|
||||
}
|
||||
//
|
||||
// /** This method returns a string describing the optimization problem.
|
||||
|
@ -490,13 +490,13 @@ public abstract class AbstractMultiObjectiveOptimizationProblem extends Abstract
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
String[] superHd = super.getAdditionalFileStringHeader();
|
||||
public String[] getAdditionalDataHeader() {
|
||||
String[] superHd = super.getAdditionalDataHeader();
|
||||
return ToolBox.appendArrays(new String[]{"paretoMetricCurrent","paretoMetricFront"}, superHd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object[] result = new Object[2];
|
||||
if (m_MOSOConverter!=null && !(m_MOSOConverter instanceof MOSONoConvert)) {
|
||||
result[0]=Double.NaN; result[1]=Double.NaN;
|
||||
@ -504,16 +504,16 @@ public abstract class AbstractMultiObjectiveOptimizationProblem extends Abstract
|
||||
result[0] = this.calculateMetric((Population)pop);
|
||||
result[1] = this.calculateMetric(getLocalParetoFront());
|
||||
}
|
||||
return ToolBox.appendArrays(result, super.getAdditionalFileStringValue(pop));
|
||||
return ToolBox.appendArrays(result, super.getAdditionalDataValue(pop));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringInfo(eva2.server.go.PopulationInterface)
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataInfo(eva2.server.go.PopulationInterface)
|
||||
*/
|
||||
@Override
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
String[] superInfo = super.getAdditionalFileStringInfo();
|
||||
public String[] getAdditionalDataInfo() {
|
||||
String[] superInfo = super.getAdditionalDataInfo();
|
||||
return ToolBox.appendArrays(new String[]{"Pareto metric on the current population (per generation)",
|
||||
"Pareto metric on the collected pareto front"}, superInfo);
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
||||
* @param pop The population that is to be refined.
|
||||
* @return String
|
||||
*/
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
public String[] getAdditionalDataHeader() {
|
||||
if (this instanceof InterfaceInterestingHistogram) return new String[]{STAT_SOLUTION_HEADER,"histogram","score"};
|
||||
else return new String[]{STAT_SOLUTION_HEADER};
|
||||
}
|
||||
@ -255,7 +255,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
||||
* @param pop The population that is to be refined.
|
||||
* @return String
|
||||
*/
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
public String[] getAdditionalDataInfo() {
|
||||
if (this instanceof InterfaceInterestingHistogram) {
|
||||
return new String[]{"Representation of the current best individual",
|
||||
"Fitness histogram of the current population",
|
||||
@ -268,7 +268,7 @@ implements InterfaceOptimizationProblem /*, InterfaceParamControllable*/, Serial
|
||||
* @param pop The population that is to be refined.
|
||||
* @return String
|
||||
*/
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object solObj;
|
||||
// solObj = AbstractEAIndividual.getDefaultDataString(pop.getBestIndividual());
|
||||
solObj = AbstractEAIndividual.getDefaultDataObject(pop.getBestIndividual());
|
||||
|
@ -575,11 +575,11 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringHeader()
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataHeader()
|
||||
*/
|
||||
@Override
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
String[] superHeader = super.getAdditionalFileStringHeader();
|
||||
public String[] getAdditionalDataHeader() {
|
||||
String[] superHeader = super.getAdditionalDataHeader();
|
||||
if (isWithConstraints())
|
||||
return ToolBox.appendArrays(superHeader, new String[] { "rawFit",
|
||||
"numViol", "sumViol" });
|
||||
@ -589,11 +589,11 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalFileStringInfo()
|
||||
* @see eva2.server.go.problems.AbstractOptimizationProblem#getAdditionalDataInfo()
|
||||
*/
|
||||
@Override
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
String[] superInfo = super.getAdditionalFileStringInfo();
|
||||
public String[] getAdditionalDataInfo() {
|
||||
String[] superInfo = super.getAdditionalDataInfo();
|
||||
if (isWithConstraints())
|
||||
return ToolBox
|
||||
.appendArrays(
|
||||
@ -607,8 +607,8 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
Object[] superVal = super.getAdditionalFileStringValue(pop);
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object[] superVal = super.getAdditionalDataValue(pop);
|
||||
if (isWithConstraints()) {
|
||||
AbstractEAIndividual indy = (AbstractEAIndividual) pop
|
||||
.getBestIndividual();
|
||||
|
@ -4,9 +4,10 @@ package eva2.server.go.problems;
|
||||
import java.util.BitSet;
|
||||
|
||||
import eva2.server.go.individuals.AbstractEAIndividual;
|
||||
import eva2.server.go.individuals.GAIndividualBinaryData;
|
||||
import eva2.server.go.individuals.InterfaceDataTypeBinary;
|
||||
import eva2.server.go.populations.Population;
|
||||
import eva2.server.go.operators.mutation.MutateEAMixer;
|
||||
import eva2.server.go.operators.mutation.MutateGASwapBits;
|
||||
import eva2.server.go.operators.mutation.MutateGAUniform;
|
||||
import eva2.server.go.strategies.InterfaceOptimizer;
|
||||
|
||||
/**
|
||||
@ -21,6 +22,7 @@ public class B1Problem extends AbstractProblemBinary implements java.io.Serializ
|
||||
|
||||
public B1Problem() {
|
||||
super();
|
||||
this.getIndividualTemplate().setMutationOperator(new MutateEAMixer(new MutateGASwapBits(), new MutateGAUniform()));
|
||||
}
|
||||
|
||||
public B1Problem(B1Problem b) {
|
||||
|
@ -158,18 +158,18 @@ public class F8Problem extends AbstractProblemDoubleOffset
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
String[] superHd = super.getAdditionalFileStringHeader();
|
||||
public String[] getAdditionalDataHeader() {
|
||||
String[] superHd = super.getAdditionalDataHeader();
|
||||
return ToolBox.appendArrays(new String[]{"numOptimaFound","maxPeakRatio"}, superHd);
|
||||
// return "#Optima found \tMaximum Peak Ratio \t" + super.getAdditionalFileStringHeader(pop);
|
||||
// return "#Optima found \tMaximum Peak Ratio \t" + super.getAdditionalDataHeader(pop);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object[] myRet = new Object[2];
|
||||
myRet[0] = this.getNumberOfFoundOptima((Population)pop);
|
||||
myRet[1] = this.getMaximumPeakRatio((Population)pop);
|
||||
return ToolBox.appendArrays(myRet, super.getAdditionalFileStringValue(pop));
|
||||
return ToolBox.appendArrays(myRet, super.getAdditionalDataValue(pop));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -483,10 +483,10 @@ public class FLensProblem extends AbstractOptimizationProblem implements Interfa
|
||||
return this.m_Show;
|
||||
}
|
||||
public String showTipText() {
|
||||
return "Toggel the visualization of the solution.";
|
||||
return "Toggle the visualization of the solution.";
|
||||
}
|
||||
|
||||
/** This method allows you to toggel the use of the material constraint.
|
||||
/** This method allows you to toggle the use of the material constraint.
|
||||
* @param show Whether to show the result or not
|
||||
*/
|
||||
public void setUseMaterialConst(boolean show) {
|
||||
@ -496,7 +496,7 @@ public class FLensProblem extends AbstractOptimizationProblem implements Interfa
|
||||
return this.m_UseMaterialConst;
|
||||
}
|
||||
public String useMaterialConstTipText() {
|
||||
return "Toggel the use of the material constraint.";
|
||||
return "Toggle the use of the material constraint.";
|
||||
}
|
||||
|
||||
/** This method allows you to choose the EA individual
|
||||
|
@ -17,7 +17,7 @@ public interface InterfaceAdditionalPopulationInformer {
|
||||
* @param pop The population of the optimization run.
|
||||
* @return String
|
||||
*/
|
||||
public String[] getAdditionalFileStringHeader();
|
||||
public String[] getAdditionalDataHeader();
|
||||
|
||||
/**
|
||||
* Optionally return informative descriptions of the data fields.
|
||||
@ -25,12 +25,12 @@ public interface InterfaceAdditionalPopulationInformer {
|
||||
* @param pop
|
||||
* @return
|
||||
*/
|
||||
public String[] getAdditionalFileStringInfo();
|
||||
public String[] getAdditionalDataInfo();
|
||||
|
||||
/**
|
||||
* This method returns additional statistical data.
|
||||
* @param pop The population that is to be refined.
|
||||
* @return String
|
||||
*/
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop);
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop);
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
||||
return "Noise level on the fitness value.";
|
||||
}
|
||||
|
||||
/** This method toggels the use of inner constants.
|
||||
/** This method toggles the use of inner constants.
|
||||
* @param b The flag to use inner constants.
|
||||
*/
|
||||
public void setUseInnerConst(boolean b) {
|
||||
@ -376,10 +376,10 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
||||
return this.m_UseInnerConst;
|
||||
}
|
||||
public String useInnerConstTipText() {
|
||||
return "Toggel the use of inner constants.";
|
||||
return "Toggle the use of inner constants.";
|
||||
}
|
||||
|
||||
/** This method toggels the use of local hill climbing for inner constants.
|
||||
/** This method toggles the use of local hill climbing for inner constants.
|
||||
* @param b The flag to use local hill climbing for inner constants.
|
||||
*/
|
||||
public void setUseLocalHillClimbing(boolean b) {
|
||||
@ -510,14 +510,14 @@ public class PSymbolicRegression extends AbstractOptimizationProblem implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
String[] superHd = super.getAdditionalFileStringHeader();
|
||||
public String[] getAdditionalDataHeader() {
|
||||
String[] superHd = super.getAdditionalDataHeader();
|
||||
return ToolBox.appendArrays(new String[]{"bestIndySize","avgIndySize","avgMaxIndyDepth"}, superHd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
Object[] superDat = super.getAdditionalFileStringValue(pop);
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
Object[] superDat = super.getAdditionalDataValue(pop);
|
||||
return ToolBox.appendArrays(new Object[]{getBestIndySize(pop), getAvgIndySize(pop), getAvgIndyDepth(pop)}, superDat);
|
||||
}
|
||||
|
||||
|
@ -1142,14 +1142,14 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
||||
return "If fitness improves less than this value within the halting window, convergence is assumed. May be set to zero.";
|
||||
}
|
||||
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
public String[] getAdditionalDataHeader() {
|
||||
return new String[]{"numUndiff","numActSpec","avgSpecMeas","numArchived",
|
||||
"archivedMedCorr", "archivedMeanDist"
|
||||
// , "numCollisions", "clustSig"
|
||||
};
|
||||
}
|
||||
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
public String[] getAdditionalDataInfo() {
|
||||
return new String[] {
|
||||
"The number of exploring individuals in the main population",
|
||||
"The number of active species (sub-populations)",
|
||||
@ -1162,7 +1162,7 @@ public class ClusterBasedNichingEA implements InterfacePopulationChangedEventLis
|
||||
};
|
||||
}
|
||||
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
// int actives = countActiveSpec();
|
||||
return new Object[] {
|
||||
m_Undifferentiated.size(),
|
||||
|
@ -418,15 +418,15 @@ public class ClusteringHillClimbing implements InterfacePopulationChangedEventLi
|
||||
return "Set the method to be used for the hill climbing as local search";
|
||||
}
|
||||
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
public String[] getAdditionalDataHeader() {
|
||||
return new String[]{"numIndies"};
|
||||
}
|
||||
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
public String[] getAdditionalDataInfo() {
|
||||
return new String[]{"The current population size"};
|
||||
}
|
||||
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
return new Object[]{m_Population.size()};
|
||||
}
|
||||
|
||||
|
@ -2067,17 +2067,17 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
||||
// public void setDoLocalSearch(boolean doLocalSearch) {
|
||||
// this.doLocalSearch = doLocalSearch;
|
||||
// }
|
||||
public String[] getAdditionalFileStringHeader() {
|
||||
public String[] getAdditionalDataHeader() {
|
||||
if (emaPeriods > 0) return new String[]{"meanEMASpeed", "meanCurSpeed"};
|
||||
else return new String[]{"meanCurSpeed"};
|
||||
}
|
||||
|
||||
public String[] getAdditionalFileStringInfo() {
|
||||
public String[] getAdditionalDataInfo() {
|
||||
if (emaPeriods > 0) return new String[]{"Exponential moving average of the (range-relative) speed of all particles", "The mean (range-relative) current speed of all particles"};
|
||||
else return new String[]{"The mean (range-relative) current speed of all particles"};
|
||||
}
|
||||
|
||||
public Object[] getAdditionalFileStringValue(PopulationInterface pop) {
|
||||
public Object[] getAdditionalDataValue(PopulationInterface pop) {
|
||||
AbstractEAIndividual indy = (AbstractEAIndividual)pop.get(0);
|
||||
if (emaPeriods>0) {
|
||||
double relSp;
|
||||
|
@ -791,7 +791,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
||||
values.addAll(Arrays.asList(getSimpleOutputValues()));
|
||||
if (informerList != null) {
|
||||
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||
List<Object> reqList = Arrays.asList(informer.getAdditionalFileStringValue(pop));
|
||||
List<Object> reqList = Arrays.asList(informer.getAdditionalDataValue(pop));
|
||||
values.addAll(reqList);
|
||||
}
|
||||
}
|
||||
@ -821,9 +821,9 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
||||
LinkedList<String> headers = new LinkedList<String>();
|
||||
if (metaInfo!=null && (metaInfo.size()>0)) System.err.println("Warning, metaInfo list should be empty in AbstractStatistics.getAdditionalInfoInfo");
|
||||
for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||
headers.addAll(Arrays.asList(informer.getAdditionalFileStringHeader()));
|
||||
if (metaInfo!=null) metaInfo.addAll(Arrays.asList(informer.getAdditionalFileStringInfo()));
|
||||
// hdr = hdr + "\t " + informer.getAdditionalFileStringHeader(pop);
|
||||
headers.addAll(Arrays.asList(informer.getAdditionalDataHeader()));
|
||||
if (metaInfo!=null) metaInfo.addAll(Arrays.asList(informer.getAdditionalDataInfo()));
|
||||
// hdr = hdr + "\t " + informer.getAdditionalDataHeader(pop);
|
||||
}
|
||||
Iterator<String> hIter = headers.iterator();
|
||||
Iterator<String> mIter = (metaInfo!=null) ? metaInfo.iterator() : null;
|
||||
@ -866,7 +866,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
||||
// ArrayList<Object> additionalObjects = new ArrayList<Object>(5);
|
||||
//
|
||||
// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||
// additionalObjects.addAll(Arrays.asList(informer.getAdditionalFileStringValue(pop)));
|
||||
// additionalObjects.addAll(Arrays.asList(informer.getAdditionalDataValue(pop)));
|
||||
// }
|
||||
// String addInfo = StringTools.concatValues(additionalObjects, textFieldDelimiter);
|
||||
// Double[] retVals = parseDoubles(additionalObjects);
|
||||
@ -876,7 +876,7 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
||||
//// StringBuffer addBuffer = new StringBuffer();
|
||||
//// for (InterfaceAdditionalPopulationInformer informer : informerList) {
|
||||
//// addBuffer.append(" \t ");
|
||||
//// addBuffer.append(informer.getAdditionalFileStringValue(pop));
|
||||
//// addBuffer.append(informer.getAdditionalDataValue(pop));
|
||||
//// }
|
||||
//// String addInfo = addBuffer.toString().trim();
|
||||
//// if (addInfo.startsWith("\t")) addInfo.substring(2); // remove first separator to avoid returning empty field as double
|
||||
|
@ -384,13 +384,13 @@ public class StatsParameter implements InterfaceStatisticsParameter, InterfaceNo
|
||||
ArrayList<String> infoFields = new ArrayList<String>();
|
||||
// parse list of header elements, show additional Strings according to names.
|
||||
for (InterfaceAdditionalPopulationInformer inf : informers) {
|
||||
headerFields.addAll(Arrays.asList(inf.getAdditionalFileStringHeader()));
|
||||
headerFields.addAll(Arrays.asList(inf.getAdditionalDataHeader()));
|
||||
if (infoFields.size()<headerFields.size()) { // add info strings for tool tips - fill up with null if none have been returned.
|
||||
String[] infos = inf.getAdditionalFileStringInfo();
|
||||
String[] infos = inf.getAdditionalDataInfo();
|
||||
if (infos!=null) infoFields.addAll(Arrays.asList(infos));
|
||||
while (infoFields.size()<headerFields.size()) infoFields.add(null);
|
||||
}
|
||||
// header += inf.getAdditionalFileStringHeader(null); // lets hope this works with a null
|
||||
// header += inf.getAdditionalDataHeader(null); // lets hope this works with a null
|
||||
}
|
||||
// create additional fields to be selectable by the user, defined by the informer headers
|
||||
// StringSelection ss = new StringSelection(GraphSelectionEnum.getAndAppendArray(headerFields.toArray(new String[headerFields.size()])));
|
||||
|
Loading…
x
Reference in New Issue
Block a user