Minor additions to MutateEAMixer and MatlabProblem
This commit is contained in:
parent
a2b88073ba
commit
65632f4cf9
@ -49,6 +49,16 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable {
|
||||
this.m_Mutators.setWeightsLabel("Weigths");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a mutation mixer with equal weights of the given mutation operators.
|
||||
* @param mutators
|
||||
*/
|
||||
public MutateEAMixer(InterfaceMutation[] mutators) {
|
||||
this.m_Mutators = new PropertyMutationMixer(mutators);
|
||||
this.m_UseSelfAdaption = false;
|
||||
}
|
||||
|
||||
public MutateEAMixer(MutateEAMixer mutator) {
|
||||
this.m_Mutators = (PropertyMutationMixer)mutator.m_Mutators.clone();
|
||||
this.m_UseSelfAdaption = mutator.m_UseSelfAdaption;
|
||||
@ -150,7 +160,7 @@ public class MutateEAMixer implements InterfaceMutation, java.io.Serializable {
|
||||
* @return description
|
||||
*/
|
||||
public static String globalInfo() {
|
||||
return "This mmeta-mutation operator allows you to combine multiple alternative mutation operators.";
|
||||
return "This meta-mutation operator allows you to combine multiple alternative mutation operators.";
|
||||
}
|
||||
|
||||
/** Choose the set of mutators.
|
||||
|
@ -52,6 +52,7 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf
|
||||
|
||||
public MatlabProblem(MatlabProblem o) {
|
||||
// this.matlab = o.matlab;
|
||||
this.m_Template=null;
|
||||
this.handler = o.handler;
|
||||
this.runnable = o.runnable;
|
||||
this.allowSingleRunnable = o.allowSingleRunnable;
|
||||
@ -99,7 +100,7 @@ public class MatlabProblem extends AbstractOptimizationProblem implements Interf
|
||||
((InterfaceDataTypeDouble)this.m_Template).SetDoubleRange(range);
|
||||
}
|
||||
} else {
|
||||
m_Template = new GAIndividualIntegerData();
|
||||
if (m_Template == null) m_Template = new GAIndividualIntegerData();
|
||||
int intLen = 1+((getProblemDimension()-1)/32);
|
||||
int lastIntCodingBits = getProblemDimension()-((intLen-1)*32);
|
||||
if (lastIntCodingBits > 32) System.err.println("ERROR in MatlabProblem:initTemplate");
|
||||
|
Loading…
x
Reference in New Issue
Block a user